claude-engineer 匹配Windows系统

claude-engineer

依赖
Tavily AI
https://app.tavily.com/home
Ollama
https://ollama.com

下载
git clone https://github.com/Doriandarko/claude-engineer.git

匹配:有OLLAMA_HOST环境变量时的API的http地址

问题:当有环境变量OLLAMA_HOST=0.0.0.0,这时候需要明确指定ollama的http网址(否则使用的是0.0.0.0:11434)
方案:明确指定ollama的http地址。

代码(py)
# client = ollama.AsyncClient() # 源代码 client = ollama.AsyncClient('http://127.0.0.1:11434')

匹配:默认创建的路径是linux系统路径,现在要修改成windows系统路径
方案:通过修改提示词,增加项目根目录的指定。

代码(py)
1. create_folder: Create new directories in the project structure, root directory is "D:\\snake\\". 2. create_file: Generate new files with specified content. Strive to make the file as complete and useful as possible, root directory is "D:\\snake\\".

tools = [ { "type": "function", "function": { "name": "create_folder", "description": "Create a new folder at the specified path on Windows system with root directory D:\\snake\\", "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "The absolute or relative path where the folder should be created" } }, "required": ["path"] } } }, { "type": "function", "function": { "name": "create_file", "description": "Create a new file at the specified path with the given content on Windows system with root directory D:\\snake\\", "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "The absolute or relative path where the file should be created" }, "content": { "type": "string", "description": "The content of the file" } }, "required": ["path", "content"] } } }, ]

提示词
write snake game with python.

ollama的关键限制
没有找到合适的本地模型(小于33B),能正确的创建项目文件,运行代码、并使用tavily。

posted @ 2024-08-03 21:43  lusonixs  阅读(27)  评论(0编辑  收藏  举报