azure-hosted-copilot-sdk
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub Copilot SDK on Azure
在Azure上使用GitHub Copilot SDK
Step 1: Route
步骤1:路径选择
| User wants | Action |
|---|---|
| Build new (empty project) | Step 2A (scaffold) |
| Add new SDK service to existing repo | Step 2B (scaffold alongside) |
| Deploy existing SDK app to Azure | Step 2C (add infra to existing SDK app) |
| Add SDK to existing app code | Integrate SDK |
| Use Azure/own model | Step 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-serviceTemplate 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 to include both existing and new services. See deploy existing ref.
azure.yaml用户已有现有代码,希望在旁边新增一个Copilot SDK服务。将模板搭建到临时目录,将API服务+基础设施复制到用户的代码库中,调整以同时包含现有服务和新服务。请参阅现有项目部署参考文档。
azure.yamlStep 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):
| Path | Config |
|---|---|
| GitHub default | No |
| GitHub specific | |
| Azure BYOM | |
See model config ref.
三种模型路径(基于步骤2A/2B之上):
| 路径 | 配置 |
|---|---|
| GitHub默认模型 | 无需 |
| 指定GitHub模型 | |
| Azure BYOM | |
请参阅模型配置参考文档。
Step 4: Deploy
步骤4:部署
Invoke azure-prepare (skip its Step 0 routing — scaffolding is done) → azure-validate → azure-deploy in order.
按顺序调用azure-prepare(跳过其步骤0的路径选择——脚手架已完成)→ azure-validate → azure-deploy。
Rules
注意事项
- Read in user's repo before changes
AGENTS.md - Docker required ()
docker info
- 在进行更改前,请阅读用户代码库中的
AGENTS.md - 需要Docker环境(执行检查)
docker info