azure-hosted-copilot-sdk

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GitHub Copilot SDK on Azure

在Azure上使用GitHub Copilot SDK

Step 1: Route

步骤1:路径选择

User wantsAction
Build new (empty project)Step 2A (scaffold)
Add new SDK service to existing repoStep 2B (scaffold alongside)
Deploy existing SDK app to AzureStep 2C (add infra to existing SDK app)
Add SDK to existing app codeIntegrate SDK
Use Azure/own modelStep 3 (BYOM config)
用户需求操作
构建新的(空项目)步骤2A(搭建脚手架)
向现有代码库添加新的SDK服务步骤2B(在现有项目旁搭建脚手架)
将现有SDK应用部署到Azure步骤2C(为现有SDK应用添加基础设施)
向现有应用代码中添加SDK集成SDK
使用Azure/自定义模型步骤3(BYOM配置)

Step 2A: Scaffold New (Greenfield)

步骤2A:搭建全新项目(从零开始)

azd init --template azure-samples/copilot-sdk-service
Template includes API (Express/TS) + Web UI (React/Vite) + infra (Bicep) + Dockerfiles + token scripts — do NOT recreate. See SDK ref.
azd init --template azure-samples/copilot-sdk-service
模板包含API(Express/TS)+ Web UI(React/Vite)+ 基础设施(Bicep)+ Dockerfile + 令牌脚本 — 请勿重复创建。请参阅SDK参考文档

Step 2B: Add SDK Service to Existing Repo

步骤2B:向现有代码库添加SDK服务

User has existing code and wants a new Copilot SDK service alongside it. Scaffold template to a temp dir, copy the API service + infra into the user's repo, adapt
azure.yaml
to include both existing and new services. See deploy existing ref.
用户已有现有代码,希望在旁边新增一个Copilot SDK服务。将模板搭建到临时目录,将API服务+基础设施复制到用户的代码库中,调整
azure.yaml
以同时包含现有服务和新服务。请参阅现有项目部署参考文档

Step 2C: Deploy Existing SDK App

步骤2C:部署现有SDK应用

User already has a working Copilot SDK app and needs Azure infra. See deploy existing ref.
用户已拥有可运行的Copilot SDK应用,需要Azure基础设施。请参阅现有项目部署参考文档

Step 3: Model Configuration

步骤3:模型配置

Three model paths (layers on top of 2A/2B):
PathConfig
GitHub defaultNo
model
param — SDK picks default
GitHub specific
model: "<name>"
— use
listModels()
to discover
Azure BYOM
model
+
provider
with
bearerToken
via
DefaultAzureCredential
See model config ref.
三种模型路径(基于步骤2A/2B之上):
路径配置
GitHub默认模型无需
model
参数 — SDK会自动选择默认模型
指定GitHub模型
model: "<name>"
— 使用
listModels()
发现可用模型
Azure BYOM
model
+
provider
,并通过
DefaultAzureCredential
获取
bearerToken
请参阅模型配置参考文档

Step 4: Deploy

步骤4:部署

Invoke azure-prepare (skip its Step 0 routing — scaffolding is done) → azure-validateazure-deploy in order.
按顺序调用azure-prepare(跳过其步骤0的路径选择——脚手架已完成)→ azure-validateazure-deploy

Rules

注意事项

  • Read
    AGENTS.md
    in user's repo before changes
  • Docker required (
    docker info
    )
  • 在进行更改前,请阅读用户代码库中的
    AGENTS.md
  • 需要Docker环境(执行
    docker info
    检查)