Cấu hình
midicoder init ghi cấu hình vào .midicoder/config.json và secrets vào .midicoder/secrets.json.
Ví dụ config
{
"working_dir": "/absolute/path/to/project",
"stack": ["fastapi", "nest"],
"commands": [],
"llm": {
"high": {
"model": "claude-3-5-sonnet-20241022",
"base_url": "https://api.anthropic.com"
},
"cheap": {
"model": "claude-3-5-haiku-20241022",
"base_url": "https://api.anthropic.com"
}
},
"cache": {
"enable": true,
"type": "ephemeral"
},
"snapshot_whitelist": null
}
Các trường quan trọng
working_dirĐường dẫn tuyệt đối tới repo.stackStack mục tiêu, ví dụfastapi,nest,angular.llm.highDùng cho các bước nặng nhưcontract genvà quyết định patch.llm.cheapDùng cho việc chuyển đổi code giữa các stack.cacheBật cache tạm cho LLM.snapshot_whitelistDanh sách glob để giới hạn snapshot.
Secrets
.midicoder/secrets.json lưu API keys và không nên commit.
{
"llm": {
"high": { "api_key": "sk-ant-..." },
"cheap": { "api_key": "sk-ant-..." }
}
}
Thứ tự ưu tiên trong non-interactive
- Command-line flags
- Environment variables
- Default
Xem thêm tại non-interactive.md.