Back to Tensorzero

Guide: How to use Azure embedding models with TensorZero

examples/guides/embeddings/providers/azure/README.md

2026.4.1631 B
Original Source

Guide: How to use Azure embedding models with TensorZero

Running the Example

  1. Set the AZURE_API_KEY environment variable:
bash
export AZURE_API_KEY="..." # Replace with your Azure OpenAI API key
  1. Set your Azure endpoint in config/tensorzero.toml.

  2. Launch the TensorZero Gateway:

bash
docker compose up
  1. Run the example (in a separate terminal):
<details open> <summary><b>Python (OpenAI SDK)</b></summary>

a. Install the Python dependencies. We recommend using uv:

bash
uv sync

b. Run the example:

bash
uv run openai_sdk.py
</details>