Skip to content

Vectorize

azure_openai_vectorize

azure_openai_vectorize(batch, api_key=None, azure_endpoint=None, api_version=None, model=None, max_retries=5)

Generates vector embeddings of each string item in a list. Uses the Azure OpenAI service.

Note: temperature is intentionally not exposed here — it does not apply to embedding generation, which is deterministic at the API level.

Parameters:

Name Type Description Default
batch list[str]

A list of strings to vectorize.

required
api_key str | None

Access key for the Azure OpenAI resource

None
azure_endpoint str | None

Your Azure endpoint, including the resource, e.g. https://example-resource.azure.openai.com/. if not provided will default to environment variable AZURE_OPENAI_ENDPOINT.

None
api_version str | None

API version for Azure resource.

None
model str | None

Model deployment name within the Azure resource. If not provided will default to environment variable AZURE_OPENAI_DEPLOYMENT.

None
max_retries int

Maximum number of unsuccessful call attempts to the OpenAI service before returning an error.

5

Returns:

Name Type Description
embeddings list[list[float]]

A list of vector embeddings