Phi、Llama、Mistral、Cohere 等模型的访问。
身份验证
导航到 Azure Portal 中的 Azure AI Foundry 并创建一个服务。然后设置您的环境变量:示例
将AzureAIFoundry 与您的 Agent 一起使用:
高级示例
在此处查看更多示例。参数
AzureAIFoundry 是 Model 类的子类,可以访问相同的参数。Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
了解如何在 Agno 中使用 Azure AI Foundry 模型。
Phi、Llama、Mistral、Cohere 等模型的访问。
export AZURE_API_KEY=***
export AZURE_ENDPOINT=*** # 格式为 https://<your-host-name>.<your-azure-region>.models.ai.azure.com/models
# 可选:
# export AZURE_API_VERSION=***
setx AZURE_API_KEY *** # 格式为 https://<your-host-name>.<your-azure-region>.models.ai.azure.com/models
setx AZURE_ENDPOINT ***
# 可选:
# setx AZURE_API_VERSION ***
AzureAIFoundry 与您的 Agent 一起使用:
from agno.agent import Agent
from agno.models.azure import AzureAIFoundry
agent = Agent(
model=AzureAIFoundry(id="Phi-4"),
markdown=True
)
# 在终端上打印响应
agent.print_response("写一个两句话的恐怖故事。")
AzureAIFoundry 是 Model 类的子类,可以访问相同的参数。