如何使用 Continue 配置 Azure AI Foundry

Azure 门户中创建 Azure AI Foundry 资源
name: My Config
version: 0.0.1
schema: v1

models:
  - name: <Model_NAME>
    provider: azure
    model: <MODEL_ID>
    apiBase: <YOUR_DEPLOYMENT_BASE>
    apiKey: <YOUR_AZURE_API_KEY> # If you use subscription key, try using Azure gateway to rename it apiKey
    env:
      deployment: <YOUR_DEPLOYMENT_NAME>
      apiType: azure-foundry # Or "azure-openai" if using OpenAI models
      apiVersion: 2023-07-01-preview # Azure API version

Azure OpenAI 服务(备选方案)

点击此处获取 Azure OpenAI 服务的使用权限
Azure OpenAI 服务需要配置一些额外的参数,例如部署名称和 API 基础 URL。
要在 Azure AI Foundry 中找到这些信息,请先选择您想要连接的模型。然后访问 Endpoint(终结点) > Target URI(目标 URI)。
例如,目标 URI 为 https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview,它将映射到以下配置
name: My Config
version: 0.0.1
schema: v1

models:
  - name: <MODEL_NAME>
    model: <MODEL_ID>
    provider: azure
    apiBase: https://just-an-example.openai.azure.com
    apiKey: <YOUR_AZURE_API_KEY>
    env:
      apiVersion: <API_VERSION>
      deployment: <MODEL_DEPLOYMENT>
      apiType: azure-openai