您现在的位置是:首页 >技术教程 >如何把DeepSeek这个奈斯工具接入到Pycharm里网站首页技术教程
如何把DeepSeek这个奈斯工具接入到Pycharm里
简介如何在pycharm中接入deepseek
最近特别火的DeepSeek,想必已经家喻户晓。如果我们在使用Pycharm进行编程时,使用DeepSeek作为辅助工具,能够高效,迅捷,准确回答我们在编程时所遇到的问题。何乐而不为呢?
那么我们该如何把DeepSeek接入到Pycharm里呢?
步骤如下:
1.获取DeepSeek API Key
1)进入DeepSeek官网:DeepSeek | 深度求索
2) 点击官网右侧的:API 开放平台
3)第一次,会有十元的赠送,点击左侧的"API keys"
4) 然后点击创建API key, 名称自己来定就好。
Note: key一定要保存好哈
2)打开Pycharm, 找到“setting”,在Plugins里面输入"Continues",点击安装即可。
3)点击右侧出现的“Continues”,然后再点击设置那个标志
4)会出现一个“config.json”的文件,把里面的内容替代一下.有两个地方需要输入第一步所获取的DeepSeek的API Key,修改时,记得允许edit。
{
"completionOptions": {
"BaseCompletionOptions": {
"temperature": 0.0,
"maxTokens": 256
}
},
"models": [
{
"title": "DeepSeek",
"model": "deepseek-chat",
"contextLength": 128000,
"apiKey": "DeepSeek的API Key",
"provider": "deepseek",
"apiBase": "https://api.deepseek.com/beta"
}
],
"tabAutocompleteModel": {
"title": "DeepSeek Coder",
"model": "deepseek-coder",
"apiKey": "DeepSeek的API Key",
"provider": "deepseek",
"apiBase": "https://api.deepseek.com/beta"
},
"customCommands": [
{
"name": "test",
"prompt": "{
{ input }}}
Write 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": "folder",
"params": {}
},
{
"name": "codebase",
"params": {}
}
],
"slashCommands": [
{
"name": "share",
"description": "Export the current chat session to markdown"
},
{
"name": "commit",
"description": "Generate a git commit message"
}
]
}
5)保存文件以后,在右侧点击“Continues”就可以辅助你编程啦,比如:
DeepSeek回答的真是太好了! 我相信在它的帮助下,我们的编程能力会提升一个新的level!
欢迎大家,多多交流和学习!🍺
风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。