
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://img.shields.io/docker/pulls/liuzhuogood/github-copilot-openai-api.svg](https://hub.docker.com/r/liuzhuogood/github-copilot-openai-api) https://img.shields.io/docker/image-size/liuzhuogood/github-copilot-openai-api/latest](https://hub.docker.com/r/liuzhuogood/github-copilot-openai-api) https://img.shields.io/github/license/liuzhuogood/github-copilot-openai-api](https://github.com/liuzhuogood/github-copilot-openai-api/blob/main/LICENSE)
🔥 Turn GitHub Copilot into OpenAI API | 将 GitHub Copilot 转换为 OpenAI API
English | 中文
bash# Pull and run the image | 拉取并运行镜像 docker run -d -p 8000:8000 liuzhuogood/github-copilot-openai-api:latest # With API key authentication | 使用 API 密钥认证 docker run -d -p 8000:8000 -e API_KEY=your_secret_key liuzhuogood/github-copilot-openai-api:latest
First time setup | 首次使用:
For detailed documentation, please visit our https://github.com/liuzhuogood/github-copilot-openai-api. 更多详细文档,请访问我们的 https://github.com/liuzhuogood/github-copilot-openai-api%E3%80%82
This project provides an OpenAI API-compatible interface by reverse engineering the GitHub Copilot API. It allows you to use GitHub Copilot's capabilities through a standard OpenAI API interface, supporting streaming output and multiple models.
Using Docker (Recommended)
bashdocker run -d -p 8000:8000 liuzhuogood/github-copilot-openai-api:latest
With API key authentication:
bashdocker run -d -p 8000:8000 -e API_KEY=your_secret_key liuzhuogood/github-copilot-openai-api:latest
Building from Source
bash# Clone the repository git clone https://github.com/liuzhuogood/github-copilot-openai-api.git cd github-copilot-openai-api # Build Docker image docker build -t github-copilot-openai-api . # Run container docker run -d -p 8000:8000 github-copilot-openai-api
Environment variables:
HOST: Server host (default: 0.0.0.0)PORT: Server port (default: 8000)API_KEY: Optional API key for authenticationbashcurl http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY" \ -d '{ "model": "gpt-4", "messages": [ { "role": "user", "content": "Hello, who are you?" } ], "stream": true }'
本项目通过*** GitHub Copilot API,提供了一个与 OpenAI API 兼容的接口。它允许你通过标准的 OpenAI API 接口使用 GitHub Copilot 的功能,支持流式输出和多种模型。
使用 Docker(推荐)
bashdocker run -d -p 8000:8000 liuzhuogood/github-copilot-openai-api:latest
使用 API 密钥认证:
bashdocker run -d -p 8000:8000 -e API_KEY=your_secret_key liuzhuogood/github-copilot-openai-api:latest
从源码构建
bash# 克隆仓库 git clone https://github.com/liuzhuogood/github-copilot-openai-api.git cd github-copilot-openai-api # 构建 Docker 镜像 docker build -t github-copilot-openai-api . # 运行容器 docker run -d -p 8000:8000 github-copilot-openai-api
环境变量:
API_KEY:可选的 API 密钥认证bashcurl http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY" \ -d '{ "model": "gpt-4", "messages": [ { "role": "user", "content": "你好,请问你是谁?" } ], "stream": true }'
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务