Embedding
Initialize the AzureOpenAiEmbeddingClient
by following the instructions in the Client Initialization section.
Currently, the client sends request with Azure OpenAI API version 2024-10-21
.
We are continuously updating the client to match the latest API specification.
You can overwrite the API version by setting the api-version
parameter in the CustomRequestConfig
object.
Refer to the Custom Request Configuration section for more details.
Making Requests
const response = await client.run({
input: 'AI is fascinating'
});
const embedding = response.getEmbedding();