vscode 如何通过Continue引入AI 助手deepseek

第一步:

在deepseek 官网上注册账号,得到APIKeys(deepseek官网地址)
在这里插入图片描述创建属于自己的APIKey,然后复制这个key,(注意保存自己的key)!

第二步:

打开vscode,在插件市场安装Continue插件,
在这里插入图片描述点击设置,添加deepseek模型,默认的模型用不了。在这里插入图片描述**通过这个方法添加deepseek模型后,如果不起作用,建议通过config.json文件添加**
通过这个方法添加deepseek模型后,如果不起作用,建议通过config.json文件添加
文件内容:

{
 "completionOptions": {
 "BaseCompletionOptions": {
 "temperature": 0,
 "maxTokens": 256
    }
  },
 "models": [
    {
 "title": "DeepSeek",
 "model": "deepseek-chat",
 "contextLength": 128000,
 "apiKey": "你的ak",
 "provider": "openai",
 "apiBase": "https://api.deepseek.com/beta"
    },
    {
 "title": "DeepSeek Coder",
 "model": "deepseek-coder",
 "contextLength": 128000,
 "provider": "deepseek",
 "apiKey": "你的ak"
    }
  ],
 "tabAutocompleteModel": {
 "title": "DeepSeek",
 "model": "deepseek-chat",
 "apiKey": "你的ak",
 "provider": "openai",
 "apiBase": "https://api.deepseek.com/beta"
  },
 "slashCommands": [
    {
 "name": "edit",
 "description": "Edit highlighted code"
    },
    {
 "name": "comment",
 "description": "Write comments for the highlighted code"
    },
    {
 "name": "share",
 "description": "Export the current chat session to markdown"
    },
    {
 "name": "cmd",
 "description": "Generate a shell command"
    }
  ],
 "customCommands": [
    {
 "name": "test",
 "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
 "description": "Write unit tests for highlighted code"
    }
  ],
 "contextProviders": [
    {
 "name": "diff",
 "params": {}
    },
    {
 "name": "open",
 "params": {}
    },
    {
 "name": "terminal",
 "params": {}
    }
  ]
}

  

在这里插入图片描述
添加完成后,出现如图的模型选择,就可以正常使用了。没有生效的话,可以重新打开vscode。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值