40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
|
|
---
|
|||
|
|
title: Continue 接入
|
|||
|
|
sidebarTitle: Continue
|
|||
|
|
description: 在 VS Code / JetBrains 的 Continue 插件中使用海宇 API
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Continue 接入
|
|||
|
|
|
|||
|
|
[Continue](https://continue.dev) 是 VS Code、JetBrains 等 IDE 中的开源 AI 编程插件,支持配置 **OpenAI 兼容** 模型提供商。
|
|||
|
|
|
|||
|
|
## 前置条件
|
|||
|
|
|
|||
|
|
- 海宇控制台 **API Key** 与国内模型 ID(见 [模型广场](https://console.haiyushuke.com/models))
|
|||
|
|
|
|||
|
|
## 配置示例
|
|||
|
|
|
|||
|
|
在 Continue 配置文件 `config.yaml`(或旧版 `config.json`)中增加自定义 OpenAI 兼容提供商,例如:
|
|||
|
|
|
|||
|
|
```yaml
|
|||
|
|
models:
|
|||
|
|
- name: Haiyu DeepSeek
|
|||
|
|
provider: openai
|
|||
|
|
model: deepseek-chat
|
|||
|
|
apiKey: YOUR_HAIYUSHUKE_API_KEY
|
|||
|
|
apiBase: https://api.haiyushuke.com/v1
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
请将 `model` 替换为你在模型广场复制的 **准确 ID**;可配置多个条目对应不同模型。
|
|||
|
|
|
|||
|
|
## 注意
|
|||
|
|
|
|||
|
|
- `apiBase` 需包含 `/v1` 前缀,与海宇网关一致。
|
|||
|
|
- 不要使用未在海宇上线的海外模型 ID。
|
|||
|
|
- Key 勿写入公开仓库;本地 config 建议加入 `.gitignore`。
|
|||
|
|
|
|||
|
|
## 相关文档
|
|||
|
|
|
|||
|
|
- [工具接入概览](/docs/integrations/overview)
|
|||
|
|
- [OpenAI 兼容 SDK](/docs/guides/openai_compatible)
|