Guide: How to use Azure embedding models with TensorZero
Running the Example
- Set the
AZURE_API_KEYenvironment variable:
export AZURE_API_KEY="..." # Replace with your Azure OpenAI API key
-
Set your Azure
endpointinconfig/tensorzero.toml. -
Launch the TensorZero Gateway:
docker compose up
- Run the example (in a separate terminal):
Python (OpenAI SDK)
a. Install the Python dependencies. We recommend using uv:
uv sync
b. Run the example:
uv run openai_sdk.py