aider连接本地ollama模型

安装aider

python -m pip install -U aider-chat

启动ollama服务后
在终端中cd到项目文件夹后,输入以下连接ollama

setx   OLLAMA_API_BASE http://127.0.0.1:11434

然后输入以下选择模型,改为ollama中安装的模型名字

aider --model ollama/<model>

如以下为添加qwen2.5 code

aider --model ollama/qwen2.5-coder:latest

增加文件到上下文中

/add FileName.py

移除文件在上下文中

/drop FileName.py

更多官方教程

https://aider.chat/docs/llms/ollama.html
Logo

免费领 200 小时云算力,进群参与显卡、AI PC 幸运抽奖

更多推荐