一、pycharm安装continue插件
1.提前安装好pycharm,并双击打开
2.File – Setting
3.Plugins – 搜索Continue , 点击Install安装
4.点ok
二、获取硅基流动API
1.登入网站:https://siliconflow.cn/zh-cn/#/,并注册登入
2.获取API秘钥,保存好(后续要用)
3.在模型广场选择合适的模型,并记录好模型名称(后续要用)
三、pycharm中添加Ai功能
1.点击左侧的continue图标
2.点击设置图标
3.Add Chat model
4.点击config file
5.在弹出的config.json文件写入以下内容,原来的删除掉
{
"models": [
{
"model": "deepseek-ai/Dee改成前面记好的模型名称",
"title": "Qwen 7B",
"systemMessage": "You are an expert software developer. You give helpful and concise responses.",
"apiKey": "sk-nghdrpzwiv改成前面记号的apikey",
"provider": "openai",
"apiBase": "https://api.siliconflow.cn/v1"
},
{
"model": " deepseek-ai/De改成前面记好的模型名称",
"title": "Qwen 1.5B",
"systemMessage": "You are an expert software developer. You give helpful and concise responses.",
"apiKey": "sk-nghdrpzwivtubo改成前面记号的apikey",
"provider": "openai",
"apiBase": "https://api.siliconflow.cn/v1"
},
{
"model": "deepseek-ai/De改成前面记好的模型名称",
"title": "youdao v1",
"apiKey": "sk-nghdrpzwivtub改成前面记号的apikey",
"provider": "openai",
"apiBase": "https://api.siliconflow.cn/v1"
}
],
"tabAutocompleteModel": {
"model": "deepseek-ai/De改成前面记好的模型名称",
"title": "Qwen 7B",
"apiKey": "sk-nghdrpzwivtuboki改成前面记号的apikey",
"provider": "openai",
"apiBase": "https://api.siliconflow.cn/v1"
}
}
6.关闭pycharm,重新打开
7.选择模型
8.把Ai给出的答案插入到左边的文件中