一.效果展示:
二.實施步驟:
? ? ? ? 1.DeepSeek官網創建API key:
? ? ? ? ? ? ? ? 創建成功后,會生成一個API key:
????????2. PyCharm工具,打開文件->設置->插件,搜索“Continue”,點擊安裝
? ? ? ? 3.安裝完成后,點擊,右側會出現這個圖標,點擊該圖標,打開continue
? ? ? ? ? ? ? ? 點擊設置按鈕:
? ? ? ? ? ? ? ? 點擊Open Confid File打開配置文件:
? ? ? ? 4.將配置文件內容替換成下面的代碼,將上面的兩個apiKey替換成DeepSeek創建的apiKey
{"models": [{"title": "DeepSeek Coder","model": "deepseek-coder","contextLength": 128000,"apiKey": "替換成DeepSeek的API KEY", "provider": "deepseek"},{"title": "DeepSeek Chat","model": "deepseek-chat","contextLength": 128000,"apiKey": "替換成DeepSeek的API KEY","provider": "deepseek"}],"contextProviders": [{"name": "code","params": {}},{"name": "docs","params": {}},{"name": "diff","params": {}},{"name": "terminal","params": {}},{"name": "problems","params": {}},{"name": "folder","params": {}},{"name": "codebase","params": {}}],"slashCommands": [{"name": "share","description": "Export the current chat session to markdown"},{"name": "cmd","description": "Generate a shell command"},{"name": "commit","description": "Generate a git commit message"}]
}
? ? ? ? ? ? ? ? 重啟pycharm即可使用。