cookbook/90_models/azure/ai_foundry/README.md
Note: Fork and clone this repository if needed
Note: This cookbook is for the Azure AI Interface model. It uses the
AzureAIFoundryclass with thePhi-4model. Please change the model ID to the one you want to use.
python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate
Navigate to the Azure AI Foundry on the Azure Portal and create a service. Then, using the Azure AI Foundry portal, create a deployment and set your environment variables.
export AZURE_API_KEY=***
export AZURE_ENDPOINT="https://<your-host-name>.services.ai.azure.com/models"
export AZURE_API_VERSION="2024-05-01-preview"
You can get the endpoint from the Azure AI Foundry portal. Click on the deployed model and copy the "Target URI"
uv pip install -U openai ddgs duckdb yfinance agno
python cookbook/92_models/azure/openai/basic_stream.py
python cookbook/92_models/azure/openai/basic.py
python cookbook/92_models/azure/openai/tool_use.py
python cookbook/92_models/azure/openai/structured_output.py
python cookbook/92_models/azure/openai/storage.py
python cookbook/92_models/azure/openai/knowledge.py