Nueva publicación

Encontrar

Pregunta
· 21 mayo, 2024

Customizing retry frequency of transaction

I want to customized retry frequency of transaction so that 503 error can be prevented while pushing FHIR bundle to the LFS.

How do I achieve this?

Reference the following algorithm to increase the retry interval of IRIS transaction

An exponential backoff algorithm retries requests exponentially, increasing the waiting time between retries up to a maximum backoff time. The following algorithm implements truncated exponential backoff with jitter:

  1. Send a request to the Cloud Healthcare API.
  2. If the request fails, wait 1 + random-fraction seconds, then retry the request.
  3. If the request fails, wait 2 + random-fraction seconds, then retry the request.
  4. If the request fails, wait 4 + random-fraction seconds, then retry the request.
  5. Continue this pattern, waiting 2n + random-fraction seconds after each retry, up to a maximum-backoff time.
  6. After deadline seconds, stop retrying the request.

Use the following values as you implement the algorithm:

  • Before each retry, the wait time is min((2n + random-fraction), maximum-backoff), with n starting at 0 and incremented by 1 for each retry.
  • Replace random-fraction with a random fractional value less than or equal to 1. Use a different value for each retry. Adding this random value prevents clients from becoming synchronized and sending many retries at the same time.
  • Replace maximum-backoff with the maximum amount of time, in seconds, to wait between retries. Typical values are 32 or 64 (25 or 26) seconds. Choose the value that works best for your use case.
  • Replace deadline with the maximum number of seconds to keep sending retries. Choose a value that reflects your use case.

The client can retry after reaching the maximum-backoff time using the same value as the backoff. For example, if the maximum-backoff time is 64 seconds, retry every 64 seconds. Ensure that the client doesn't retry indefinitely.

2 comentarios
Comentarios (2)2
Inicie sesión o regístrese para continuar
Artículo
· 21 mayo, 2024 Lectura de 10 min

Open AI integration with IRIS - La voz de su amo - ¿Estás enfadado?

Siguiendo con la serie de artículos sobre gestión de archivos de voz, vamos a ver cómo podemos convertir texto en audio y recibir el archivo con la voz elegida.
También exploraremos cómo un servicio de OpenAI puede ayudarnos a analizar un texto y determinar el estado de ánimo expresado en él.
Analicemos cómo puedes crear tu propio archivo de voz y cómo puede "leer" tus sentimientos.

La voz

OpenAI ofrece un servicio que puede crear un archivo de voz con su texto. Es un salvavidas si quieres integrar un servicio de respuesta de voz para personas con discapacidad visual.

Sé que hay muchas aplicaciones que pueden leer un texto y convertirlo en voz, por ejemplo, Loquendo, AWS, Text-to-speech by Google, etc...

Sin embargo, el problema de la mayoría de ellos es que la voz no es tan natural como cabría esperar. Esto sucede porque normalmente traducen el fonema tal como suena en el lenguaje verbal, pero no ponen énfasis ni emoción en el texto.
Por otro lado, cuando usas IA, entiende el contexto del texto e intenta agregar la entonación correcta de acuerdo con él, p.e. exclamación, pregunta, tristeza, alegría, etc...

Este servicio recupera el archivo directamente como una secuencia binaria en el objeto de respuesta. También te permite utilizar diferentes tipos de archivos de audio: MP3, OVG, etc...

No quería devolver el contenido directamente, planeaba devolver una cadena Base64 que el usuario pudiera convertir en un archivo, reproducirlo directamente, etc., y que pudiera usarse a través de una API de archivos.

El primer problema al que me enfrenté fue convertir el fichero %Stream.GlobalBinary a Base64.

Mi primer intento fue leer el binario y convertirlo como una cadena que decodifica Base64.

do tHttpResponse.Data.Rewind()
set response = ""
while tHttpResponse.Data.AtEnd {
    set temp=stream.Read(4000)
    set temp=$system.Encryption.Base64Encode(temp)
    set response = response_temp
}

Sin embargo, el contenido no se convirtió correctamente a Base64.

Sin embargo, como siempre, la comunidad me salva la vida (otra vez). La idea era convertir el %Stream.GlobalBinary a un %Stream.GlobalCharacter y luego leer el contenido en Base64.
Gracias, Marc Mundt por tu respuesta maravillosa.

Después de eso, creé la siguiente clase para convertir mi flujo GlobalBinary en GlobalCharacter.

Class St.OpenAi.B64.Util Extends %RegisteredObject
{

/// Be cautious if changing CHUNKSIZE. Incorrect values could cause the resulting encoded data to be invalid.
/// It should always be a multiple of 57 and needs to be less than ~2.4MB when MAXSTRING is 3641144
Parameter CHUNKSIZE = 2097144;
ClassMethod B64EncodeStream(pStream As %Stream.Object, pAddCRLF As %Boolean = 0) As %Stream.Object
{
    set tEncodedStream=##class(%Stream.GlobalCharacter).%New()
    
    do pStream.Rewind()
    
    while ('pStream.AtEnd) {
        set tReadLen=..#CHUNKSIZE
        set tChunk=pStream.Read(.tReadLen)
        
        do tEncodedStream.Write($System.Encryption.Base64Encode(tChunk,'pAddCRLF))
        if (pAddCRLF && 'pStream.AtEnd) {
            do tEncodedStream.Write($c(13,10))
        }
    }
    
    do tEncodedStream.Rewind()
    
    quit tEncodedStream
}

}

Mi siguiente paso fue llamarlo desde la clase St.OpenAi.BO.Api.Connect y obtener Base64 correctamente.

set pResponse = ##class(St.OpenAi.Msg.Audio.SpeachResponse).%New()
do pResponseStream.Content.Rewind()
set contentfile = ##class(St.OpenAi.B64.Util).B64EncodeStream(pResponseStream.Content)
set content = ""
while ('contentfile.AtEnd)
{
   set content = content_contentfile.Read()
}
set pResponse.Content=content

¡Tengo mucha suerte de tener una comunidad tan maravillosa a mi lado!

¿Qué quieres decir en tu texto?

¿Cuál crees que es la intención aquí si tienes el siguiente texto?

“Mi vida no tiene sentido. Quiero dejarlo todo para siempre.”

Es posible que sienta que el hablante tiene la intención de hacerse algo malo a sí mismo. De hecho, como eres humano, entiendes cuál es el contexto y sabes "leer entre líneas".

Para una computadora, una palabra es una colección de 0 y 1, que deben transformarse en caracteres para que podamos entenderlos. Incluso colocamos las letras en un orden diferente; También tenemos palabras en otros idiomas: "Hello", "Hola" y "Ciao".

Podemos crear una relación entre la palabra “Hola” y su homóloga en inglés (“Hello”) o italiana (“Ciao”).

Sin embargo, no existe una manera fácil de relacionar la frase “Mi vida no tiene sentido” con algo negativo, o “Quiero dejarlo todo para siempre” con tu deseo de hacerte daño.

Si intentas hacer lo mismo que antes, podemos considerar que la frase “quiero dejarlo todo para siempre” significa que quieres hacerte daño. Puede que tenga sentido, pero en la misma línea en la siguiente frase “No me gusta esta ciudad. Quiero dejarlo todo para siempre” es neutral.

De hecho, el contexto es crucial para determinar si un texto es neutral o contiene violencia, odio o autolesión.

¿Cómo puedes entrenar tu IA con moderación?

Entrenar una IA para moderar textos implica varios pasos y consideraciones esenciales:

Recopilación de datos con etiquetas: Es fundamental reunir un conjunto de datos suficientemente grande y diverso que contenga ejemplos de textos que necesita moderar, etiquetados como apropiados o inapropiados según sus criterios de moderación.

Definición de criterios de moderación: Debe definir claramente qué tipos de contenido considera inapropiados y qué acciones se deben tomar al respecto (por ejemplo, eliminarlos, ocultarlos o marcarlos como potencialmente ofensivos).

Selección de Algoritmos y Modelos: Puede utilizar técnicas de aprendizaje automático supervisado, en las que los modelos se entrenan con ejemplos etiquetados, o técnicas de aprendizaje automático semisupervisadas, en las que se aprovechan ejemplos etiquetados y no etiquetados. Modelos como BERT, GPT o modelos específicos de clasificación de texto pueden resultar útiles en este caso.

Preprocesamiento de datos: Antes de entrenar el modelo, debe realizar tareas como tokenización, normalización del texto (por ejemplo, convertir todas las partes del texto a minúsculas), eliminación de caracteres especiales, etc.

Entrenamiento modelo: Utilice sus datos etiquetados para entrenar el modelo seleccionado. Durante el entrenamiento, el modelo aprenderá a distinguir entre textos apropiados e inapropiados según los criterios definidos.

Evaluación del desempeño del modelo: Después del entrenamiento, evalúe el rendimiento del modelo con la ayuda de un conjunto de datos de prueba independiente. Le ayudará a determinar qué tan bien se está generalizando el modelo y si necesita ajustes adicionales.

Ajuste y mejora continua: Es probable que necesite ajustar y mejorar su modelo a medida que recopila más datos y observa su desempeño en el mundo real. Puede implicar volver a entrenar el modelo con datos actualizados y optimización de parámetros.

Despliegue de producción: Una vez que esté satisfecho con el rendimiento del modelo, puede implementarlo en su sistema de moderación en línea para ayudar a automatizar el proceso de moderación de texto.

Es vital tener en cuenta que ningún sistema de moderación automatizado es perfecto, por lo que siempre es recomendable combinar la IA con la supervisión humana para abordar casos difíciles o nuevos tipos de contenido inapropiado.

El objetivo principal del servicio de "moderation" de OpenAI es proporcionar herramientas y modelos de inteligencia artificial para ayudar a las plataformas en línea a moderar y gestionar el contenido generado por los usuarios. Incluye detectar y mitigar contenido inapropiado como spam, incitación al odio, acoso, violencia, contenido sexual explícito, etc. El objetivo es ayudar a desarrollar un entorno en línea más seguro y saludable para los usuarios reduciendo la presencia de contenido dañino. Podemos hacerlo identificando contenido que pueda ser dañino y tomando medidas.

Al usar la moderación de OpenAI, el texto anterior nos arrojaría el siguiente resultado:

{
    "id": "modr-9FRqaywTVudh3Jk9FEYnxuRbrDmUH",
    "model": "text-moderation-007",
    "results": [
        {
            "flagged": true,
            "categories": {
                "sexual": false,
                "hate": false,
                "harassment": false,
                "self-harm": true,
                "sexual/minors": false,
                "hate/threatening": false,
                "violence/graphic": false,
                "self-harm/intent": true,
                "self-harm/instructions": false,
                "harassment/threatening": false,
                "violence": false
            },
            "category_scores": {
                "sexual": 6.480985575763043e-6,
                "hate": 0.00005180266089155339,
                "harassment": 0.000108763859316241,
                "self-harm": 0.861529529094696,
                "sexual/minors": 6.210859737620922e-7,
                "hate/threatening": 9.927841659873593e-8,
                "violence/graphic": 0.000012115803656342905,
                "self-harm/intent": 0.9326919317245483,
                "self-harm/instructions": 0.00005927650636294857,
                "harassment/threatening": 7.471672233805293e-6,
                "violence": 0.0008052702760323882
            }
        }
    ]
}

Se ha detectado que existe intención de autolesionarse, el porcentaje es:

Self-harm: 86.15%
Self-harm intent: 93.26%

Puedes desarrollar algunos filtros utilizando estos porcentajes y categorías detectadas y activar alertas o reenviar otro tipo de respuestas de forma más inteligente.

El modelo clasifica las siguientes categorías:

CATEGORIA DESCRIPCIÓN
hate
(Odio)
Contenido que exprese, incite o promueva el odio por motivos de raza, género, etnia, religión, nacionalidad, orientación sexual, condición de discapacidad o casta. El contenido de odio dirigido a grupos no protegidos (por ejemplo, jugadores de ajedrez) es acoso.
hate/threatening
(Odio/Amenaza)
Contenido de odio que incluya violencia o daño grave hacia el grupo objetivo por motivos de raza, género, etnia, religión, nacionalidad, orientación sexual, condición de discapacidad o casta.
harassment
(Acoso)
Contenido que exprese, incite o promueva lenguaje acosador hacia cualquier objetivo.
harassment/threatening
(Acoso/Amenaza)
Contenido de acoso que además incluya violencia o daño grave hacia cualquier objetivo.
self-harm
(Autolesiones)
Contenido que promueva, fomente o represente actos de autolesión como suicidio, cortes o lesiones y trastornos alimentarios.
self-harm/intent
(Autolesiones/Intención)
Contenido en el que el hablante expresa que está participando o tiene la intención de participar en actos de autolesión como suicidio, autolesiones/lesiones y trastornos alimentarios.
self-harm/instructions
(Autolesiones/Instrucciones)
Contenido que fomente la realización de actos de autolesión como suicidio, cortes o lesiones y trastornos alimentarios, o que brinde instrucciones o consejos sobre cómo cometer dichos actos.
sexual
(Sexual)
Contenido destinado a despertar excitación sexual, p.e. la descripción de la actividad sexual, o que promueva servicios sexuales (excluyendo educación y bienestar sexual).
sexual/minors
(Sexual/Menores)
Contenido sexual que incluya a una persona menor de 18 años.
violence
(Violencia)
Contenido que represente muerte, violencia o lesiones físicas.
violence/graphic
(Violencia/Gráfica)
Contenido que represente muerte, violencia o lesiones físicas con detalles gráficos.

El valor de la puntuación está entre 0 y 1, donde los valores más altos indican una mayor confianza. Las puntuaciones no deben interpretarse como probabilidades.

Speech

Endpoint: POST https://api.openai.com/v1/audio/speech

La API de audio proporciona un endpoint de voz basado en el modelo TTS (texto a voz). Viene con 6 voces integradas y se puede utilizar para hacer lo siguiente:

  • Narrar una publicación de blog escrita.
  • Produzca audio hablado en varios idiomas.
  • Ofrezca salida de audio en tiempo real mediante streaming.

Los parámetros de entrada serían los que se mencionan a continuación:

  • model: Requerido.
  • Está relacionado con los modelos TTS disponibles: tts-1 o tts-1-hd.
  • input: Requerido.
  • Está conectado al texto utilizado para generar audio. La longitud máxima es 4096 caracteres.
  • voice: Requerido.
  • Está vinculado a la voz a emplear a la hora de generar el audio. Las voces admitidas son “alloy”, “echo”, “fable”, “onyx”, “nova” y “shimmer”. Las vistas previas de las voces están disponibles en la guía de texto a voz.
  • response_format: Opcional.
  • Está asociado al formato del audio. Los formatos admitidos son “mp3”, “opus”, “aac”, “flac”, “wav” y “pcm”. si no se indica, el valor predeterminado es “mp3”.
  • speed: Opcional.
  • Está vinculado a la velocidad del audio generado. Seleccione un valor entre “0,25” y “4,0”. Si no se indica, el valor predeterminado es “1,0”.

Moderations

Endpoint: POST https://api.openai.com/v1/moderations

Los parámetros de entrada serían los que se mencionan a continuación:

  • model: Opcional.
  • Está relacionado con los modelos de moderación disponibles: text-moderation-stable o text-moderation-latest. si no se indica, el valor predeterminado es "text-moderation-latest".
  • input: Requerido.
  • Está conectado al texto para clasificar.

¿Que viene ahora?

Dado que OpenAI evoluciona continuamente, nadie sabe qué próxima característica lanzarán.

No olvides marcar el artículo con un “me gusta” si te ha gustado.

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 21 mayo, 2024 Lectura de 9 min

Open AI integration with IRIS - His master voice’s – Are you angry?

Continuing with the series of articles on voice file management, we are going to see how we can convert text into audio and receive the file with the chosen voice.
We will also explore how a service from OpenAI can help us analyze a text and determine the mood expressed in it.
Let's analyze how you can create your own voice file and how it can “read” your feelings.

The voice

OpenAI offers a service that can create a voice file with your text. It is a lifesaver if you want to integrate a voice response service for visually impaired people.

I know that there are a lot of applications that can read a text and convert it to a voice, for instance, Loquendo, AWS, Text-to-speech by Google, etc...

However, the problem with most of them is that the voice is not as natural as you might expect. It happens because they typically translate the phoneme as it sounds in verbal language, but they do not place emphasis or emotion in the text.
On the other hand, when you use AI, it understands the context of the text and tries to add the correct intonation according to it, e.g. exclamation, question, sadness, joy, etc...

This service retrieves the file directly as a binary stream in the response object. It also lets you use different types of audio files: MP3, OVG, etc...

I did not want to return the content directly, but I planned to return a Base64 string that the user could convert to a file, play it directly, etc., and that can be used through a file API.

The first problem that I faced was converting the %Stream.GlobalBinary file into a Base64.

My first attempt was to read the binary and convert it as a string decoding a Base64

do tHttpResponse.Data.Rewind()
set response = ""
while tHttpResponse.Data.AtEnd {
    set temp=stream.Read(4000)
    set temp=$system.Encryption.Base64Encode(temp)
    set response = response_temp
}

However, the content was not correctly converted to Base64.

Yet, as always, the community saves my life (again). The idea was to convert the %Stream.GlobalBinary to a %Stream.GlobalCharacter and then read the content in Base64. Thanks you, Marc Mundt for your amazing response.

After that, I created the following class to convert my GlobalBinary to GlobalCharacter stream.

Class St.OpenAi.B64.Util Extends %RegisteredObject
{

/// Be cautious if changing CHUNKSIZE. Incorrect values could cause the resulting encoded data to be invalid.
/// It should always be a multiple of 57 and needs to be less than ~2.4MB when MAXSTRING is 3641144
Parameter CHUNKSIZE = 2097144;
ClassMethod B64EncodeStream(pStream As %Stream.Object, pAddCRLF As %Boolean = 0) As %Stream.Object
{
    set tEncodedStream=##class(%Stream.GlobalCharacter).%New()
    
    do pStream.Rewind()
    
    while ('pStream.AtEnd) {
        set tReadLen=..#CHUNKSIZE
        set tChunk=pStream.Read(.tReadLen)
        
        do tEncodedStream.Write($System.Encryption.Base64Encode(tChunk,'pAddCRLF))
        if (pAddCRLF && 'pStream.AtEnd) {
            do tEncodedStream.Write($c(13,10))
        }
    }
    
    do tEncodedStream.Rewind()
    
    quit tEncodedStream
}

}

My next step was to call it from the St.OpenAi.BO.Api.Connect class, and get the Base64 correctly.

set pResponse = ##class(St.OpenAi.Msg.Audio.SpeachResponse).%New()
do pResponseStream.Content.Rewind()
set contentfile = ##class(St.OpenAi.B64.Util).B64EncodeStream(pResponseStream.Content)
set content = ""
while ('contentfile.AtEnd)
{
   set content = content_contentfile.Read()
}
set pResponse.Content=content

I am very lucky to have such a great community by my side!

What do you mean in your text?

What do you think the intention is here if you have the following text?

“My life has no meaning. I want to leave everything forever.”

You may feel that the speaker intends to do something bad to himself. Indeed, since you are human, you understand what the context is, and you know how to "read between the lines"

To a computer, a word is a collection of 0s and 1s, which should be transformed into characters for us to understand. We even put the characters in a different order; we also have words in other languages: "Hello", "Hola", and "Ciao".

We can create a relation between the word “Hello” and its counterpart in Spanish (“Hola”) or Italian (“Ciao”).

However, there is no easy way to relate the phrase "My life has no meaning" to something negative, or “I want to leave everything forever“ to your desire to harm yourself.

If you try to do the same as before, we can consider that the phrase “I want to leave everything forever” means that you want to harm yourself. It might make sense, but the same line in the following phrase “I don't like this city. I want to leave everything forever” is neutral.

Indeed, the context is crucial to determine if a text is neutral or contains violence, hate, or self-harm.

How can you train your AI in moderation?

Training an AI to moderate texts involves several steps and essential considerations:

Data Collection with Labels: It is critical to gather a sufficiently large and diverse dataset containing examples of texts you need to moderate, labeled as appropriate or inappropriate according to your moderation criteria.

Definition of Moderation Criteria: You need to clearly define what types of content you consider inappropriate and what actions should be taken regarding them (e.g., removing, hiding, or marking them as potentially offensive).

Selection of Algorithms and Models: You can use supervised machine learning techniques, where models are trained with labeled examples, or semi-supervised machine learning techniques, where both labeled and unlabeled examples are leveraged. Models like BERT, GPT, or specific text classification models can come in handy in this case.

Data Preprocessing: Before training the model, you should perform such tasks as tokenization, text normalization (e.g., converting all parts of the text to lowercase), removal of special characters, etc.

Model Training: Utilize your labeled data to train the selected model. During training, the model will learn to distinguish between appropriate and inappropriate texts based on the defined criteria.

Model Performance Evaluation: After training, evaluate the model's performance with the help of a separate test dataset. It will help you determine how well the model is generalizing and whether it needs additional adjustments.

Fine-Tuning and Continuous Improvement: You are likely to need to fine-tune and improve your model as you gather more data and observe its performance in the real world. It may involve retraining the model with updated data and parameter optimization.

Production Deployment: Once you are satisfied with the model's performance, you can deploy it in your online moderation system to help automate the text moderation process.

It is vital to note that no automated moderation system is perfect, so it is always advisable to combine AI with human supervision to address difficult cases or new types of inappropriate content.

The main purpose of OpenAI's "moderation" service is to provide artificial intelligence tools and models to help online platforms moderate and manage user-generated content. It includes detecting and mitigating such inappropriate content as spam, hate speech, harassment, violence, sexually explicit content, etc. The goal is to help develop a safer and healthier online environment for users by reducing the presence of harmful content. We can do it by identifying content that might be harmful and taking action.

When using OpenAI’s moderation, the previous text would throw us the following result:

{
    "id": "modr-9FRqaywTVudh3Jk9FEYnxuRbrDmUH",
    "model": "text-moderation-007",
    "results": [
        {
            "flagged": true,
            "categories": {
                "sexual": false,
                "hate": false,
                "harassment": false,
                "self-harm": true,
                "sexual/minors": false,
                "hate/threatening": false,
                "violence/graphic": false,
                "self-harm/intent": true,
                "self-harm/instructions": false,
                "harassment/threatening": false,
                "violence": false
            },
            "category_scores": {
                "sexual": 6.480985575763043e-6,
                "hate": 0.00005180266089155339,
                "harassment": 0.000108763859316241,
                "self-harm": 0.861529529094696,
                "sexual/minors": 6.210859737620922e-7,
                "hate/threatening": 9.927841659873593e-8,
                "violence/graphic": 0.000012115803656342905,
                "self-harm/intent": 0.9326919317245483,
                "self-harm/instructions": 0.00005927650636294857,
                "harassment/threatening": 7.471672233805293e-6,
                "violence": 0.0008052702760323882
            }
        }
    ]
}

It has detected that there is an intent of self-harm, the percentage is:

Self-harm: 86.15%
Self-harm intent: 93.26%

You can develop some filters using these percentages and detected categories and activate alerts or resend other types of responses more intelligently.

The model classifies the following categories:

CATEGORY DESCRIPTION
hate Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.
hate/threatening Hateful content that includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.
harassment Content that expresses, incites, or promotes harassing language towards any target.
harassment/threatening Harassment content that additionally includes violence or serious harm towards any target.
self-harm Content that promotes, encourages, or depicts such acts of self-harm as suicide, self-cutting/injury, and eating disorders.
self-harm/intent Content where the speaker expresses that they are engaging or intend to engage in such acts of self-harm as suicide, self-cutting/injury, and eating disorders.
self-harm/instructions Content that encourages performing such acts of self-harm as suicide, self-cutting/injury, and eating disorders, or that gives instructions or advice on how to commit such acts.
sexual Content meant to arouse sexual excitement, e.g. the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).
sexual/minors Sexual content that includes an individual who is under 18 years old.
violence Content that depicts death, violence, or physical injury.
violence/graphic Content that depicts death, violence, or physical injury in graphic detail.

The score value is between 0 and 1, where higher values denote higher confidence. The scores should not be interpreted as probabilities.

Speech

Endpoint: POST https://api.openai.com/v1/audio/speech

The Audio API provides a speech endpoint based on the TTS (text-to-speech) model. It comes with 6 built-in voices and can be used to do the following:

  • Narrate a written blog post.
  • Produce spoken audio in multiple languages.
  • Give real time audio output using streaming.

The input parameters would be as mentioned below:

  • model: Required.
  • It is related to the available TTS models: tts-1 or tts-1-hd.
  • input: Required.
  • It is connected to the text used to generate audio. The maximum length is 4096 characters.
  • voice: Required.
  • It is linked to the voice to employ when generating the audio. Supported voices are “alloy”, “echo”, “fable”, “onyx”, “nova”, and “shimmer”. Previews of the voices are available in Text to speech guide.
  • response_format: Optional.
  • It is associated with the format of the audio. Supported formats are “mp3”, “opus”, “aac”, “flac”, “wav”, and “pcm”. if not indicated, the default value is “mp3”.
  • speed: Optional.
  • It is bonded with the speed of the generated audio. Select a value from “0.25” to “4.0”. If not indicated, the default value is “1.0”.

Moderations

Endpoint: POST https://api.openai.com/v1/moderations

The input parameters would be as mentioned below:

  • model: Optional.
  • It is related to the available moderation models: text-moderation-stable or text-moderation-latest. if not indicated, the default value is “text-moderation-latest”.
  • input: Required.
  • It is connected to the text to classify.

What's next?

Since OpenAI is evolving continuously, nobody knows what next feature they will release.

Do not forget to mark the article with a “like” if you enjoyed it.

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 21 mayo, 2024 Lectura de 4 min

FHIR アダプターを使ってレガシーシステムに FHIR サービスを提供 - アーキテクチャ編

さて、FHIR アダプターの使用例に戻り、この記事では、IRIS インスタンスでの構成方法とインストールの結果を確認したいと思います。

プロジェクトの構成手順は公式ドキュメントで指示されているものと同じなので、直接こちらで確認できます。 では作業に移りましょう!

インストール

この記事に関連するプロジェクトでわかるように、IRIS インスタンスを Docker でデプロイしています。そのため最初の構成の主な部分は Dockerfile で行います。 Docker 構成については詳しく確認しないため、気にする必要はありません。

FHIR アダプターをインストールする手順は、たったこれだけです。

Comentarios (0)0
Inicie sesión o regístrese para continuar
Anuncio
· 20 mayo, 2024

InterSystems 编程大赛获奖名单公布:Vector Search, GenAI 与 ML

Hi开发者们,

我们很开心地向大家公布 InterSystems编程大赛:Vector Search, GenAI 与 ML 的获奖者!

我们收到了 15份参赛作品 🔥,感谢这些出色的参赛者! 

专家提名奖

🥇第一名,5,000 美元, @Maria Nesterenko@Katsiaryna Shaustruk@Maria Gladkova 提交的应用程序BG-AppealAI 

🥈第二名3,000 美元, @José Pereira, @Henry Pereira, @Henrique Dias 提交的应用程序 iris-medicopilot 

🥉 第三名,1,500 美元, @Ikram Shah 提交的应用程序 IRIS AI Studio 

🏅第四名,750 美元,  @Zacchaeus Chok, @Crystal Cheong 提交的应用程序iris-health-coach 

🏅第五名,500美元,@Julio Momente, @Davi Massaru Teixeira Muta, @Lucas Fernandes 提交的应用程序 companies-search 

🌟 100 美元, HackUPC24_Klìnic ,由 @Tanguy Vansnick 提交

🌟 100 美元, geo-vector-search ,由 @Robert Cemper 提交 

🌟 100 美元, AriticleSimilarity  ,由 @xuanyou du 提交

🌟 100 美元, iris-VectorLab ,由 @Muhammad Waseem 提交

🌟 100 美元, DNA-similarity-and-classify ,由 @Davi Massaru Teixeira Muta@Nicole Raimundo 提交

社区提名奖

🥇 第一名1,000 美元,@José Pereira, @Henry Pereira, @Henrique Dias 提交的应用 iris-medicopilot 

🥈 第二名750 美元, @Maria Nesterenko@Katsiaryna Shaustruk@Maria Gladkova 提交的应用 BG-AppealAI 

🥉 第三名500 美元,  @shan yue 提交的应用 iris-image-vector-search 

🏅 第四名,300 美元,@xuanyou du 提交的应用 AriticleSimilarity  

🏅 第五名200 美元, @Julio Momente, @Davi Massaru Teixeira Muta, @Lucas Fernandes 提交的应用 companies-search 

我们向所有参赛者和获奖者表示最诚挚的祝贺!

下次再一起享受乐趣吧;)

1 Comentario
Comentarios (1)1
Inicie sesión o regístrese para continuar