听说DeepSeek Coder V2的代码能力很牛

听说DeepSeek Coder V2的代码能力很牛,请问一下各位大佬,如何IDE中调用这个api,实现代码补全和chat功能?感激不尽

7 个赞

deepseek 自己就兼容 openai 的调用方式,在 vscode 里可以使用始皇的 override 通过 copilot 里调用,也可以装支持自定义接口的插件,比如 continue。别的 ide 不熟

4 个赞

让它写的八个不同图形库的密码生成器只要安装库就能直接跑,还可以的

3 个赞

那么在哪能使用它呢

1 个赞
1 个赞

个人感觉,比chatgpt4o强

6 个赞

我这用continue 的 tab完成 idea一直没效果不知道咋回事,看后台有调用,就是前台不显示

1 个赞

Instruct型号的模型不适用于代码补全
The instruct model was trained to output human-like answers to questions.
也就是说deepseek平台提供的API是不适用于tab补全的,因为会以对话的方式回答你输入的prompt

1 个赞

用override呀

1 个赞

Override该怎么配置,我没法使用deepseek进行代码补全,chat可以,尝试了一下deepseek的补全接口会报错,中间估计得套一层东西

2 个赞

continue现在还不支持deepseek v2的autocomplete代码补全,配置后会提示 Stop string array too long,只能等作者修复了

3 个赞

现在支持了

2 个赞

需要用自定义配置,楼上那个 issue 链接里面有

2 个赞

config.json 能参考一下吗

这么强的吗

学无止境

{
  "models": [],
  "tabAutocompleteOptions": {
    "template": "Please teach me what I should write in the `hole` tag, but without any further explanation and code backticks, i.e., as if you are directly outputting to a code editor. It can be codes or comments or strings. Don't provide existing & repetitive codes. If the provided prefix and suffix contain incomplete code and statement, your response should be able to be directly concatenated to the provided prefix and suffix. Also note that I may tell you what I'd like to write inside comments. \n{{{prefix}}}<hole></hole>{{{suffix}}}\n\nPlease be aware of the environment the hole is placed, e.g., inside strings or comments or code blocks, and please don't wrap your response in ```. You should always provide non-empty output.\n",
    "useCache": true,
    "maxPromptTokens": 2048
  },
  "tabAutocompleteModel": {
    "title": "DeepSeek-V2",
    "model": "deepseek-coder",
    "apiKey": REDACTED,
    "contextLength": 8192,
    "apiBase": "https://api.deepseek.com",
    "completionOptions": {
      "maxTokens": 4096,
      "temperature": 0,
      "topP": 1,
      "presencePenalty": 0,
      "frequencyPenalty": 0
    },
    "provider": "openai",
    "useLegacyCompletionsEndpoint": false
  }
}
4 个赞

不是这个原因,一个是要关闭新版idea的内置的AI提示功能,还有就是模型要选对,有些模型没提升

2 个赞

开关也别忘了开

求教 在IDEA 怎么弄, VS Code没啥问题,IDEA 死活不能补全