[admonition]1080 录制:VS code 配置 Deepseek R1 简易教学_哔哩哔哩_bilibili[/admonition]
360P 预览 – URL 外链:
1. 安装 Continue 插件 、Cline 插件
- 打开 VSCode,进入扩展市场(
Ctrl+Shift+X)。搜索插件 “Continue” 或者 Cliet。 - 以上两种方式,可以作为平替解决 Cursor 的收费问题。
![[ 软件]:VS code 配置 Deepseek R1 辅助 [软件]:VS code 配置 Deepseek R1 辅助](https://lifetruth.top/wp-content/uploads/2025/03/image-4-1024x532.png)
![[ 软件]:VS code 配置 Deepseek R1 辅助 [软件]:VS code 配置 Deepseek R1 辅助](https://lifetruth.top/wp-content/uploads/2025/03/image-2-1024x589.png)
2. 获取 DeepSeek 的 API Key
- 生成 API Key:找到 “创建 API 密钥” 或 “Generate API Key” 选项。
- 方式 1:付费,收费方案如下;方式二:硅基流邀请,赠送额度
![[ 软件]:VS code 配置 Deepseek R1 辅助 [软件]:VS code 配置 Deepseek R1 辅助](https://lifetruth.top/wp-content/uploads/2025/03/image-1-1024x651.png)
![[ 软件]:VS code 配置 Deepseek R1 辅助 [软件]:VS code 配置 Deepseek R1 辅助](https://lifetruth.top/wp-content/uploads/2025/03/image-3-1024x460.png)
3. 配置 Cline 插件使用 DeepSeek API
![[ 软件]:VS code 配置 Deepseek R1 辅助 [软件]:VS code 配置 Deepseek R1 辅助](https://lifetruth.top/wp-content/uploads/2025/03/image-8.png)
- 打开 Continue 插件配置 :
- 在 VSCode 中按下
Ctrl+,打开设置。 - 搜索 “Continue” 或直接查看插件的配置选项。
- 在 VSCode 中按下
- 输入 DeepSeek API Key:
- 找到 API Key 或 Authentication 字段。
- 粘贴你的 DeepSeek API Key。
- 配置模型端点(可选):
- 如果 DeepSeek 需要自定义 API 端点(如
https://api.deepseek.com/v1),填写到对应位置。 - 示例配置:json 复制 ”continue.providers”: {“deepseek”: { “apiKey”: “sk-xxxxxxxxxxxxxxxx”, “baseUrl”: “https://api.deepseek.com/v1”} }
- 如果 DeepSeek 需要自定义 API 端点(如
4. 安装大模型(本地或云端)
方案一:使用云端大模型(如 DeepSeek API)
- 直接通过 API 调用云端模型(无需本地安装),只需确保 API Key\URL\ 版本正确即可。
方案二:本地部署大模型(如 LLaMA、CodeLlama 等)
参考其他网站教程。
5. 验证配置
- 测试 API 调用 :
- 在 Python 文件中运行上述 API 示例代码,检查是否返回预期结果
![[ 软件]:VS code 配置 Deepseek R1 辅助 [软件]:VS code 配置 Deepseek R1 辅助](https://lifetruth.top/wp-content/uploads/2025/03/image-7-1024x424.png)
安装失败,提示:Git must be installed to use checkpoints. See here for instructions.
![[ 软件]:VS code 配置 Deepseek R1 辅助 [软件]:VS code 配置 Deepseek R1 辅助](https://lifetruth.top/wp-content/uploads/2025/03/image-5-1024x524.png)
正文完