适配多个 LLM 源 (anthropic/gemini/mistral/groq/github) + SQLite 配置收敛 + 测试插件

This commit is contained in:
root
2026-07-03 14:03:51 +08:00
parent b1b90ae09f
commit 988de228eb
16 changed files with 2059 additions and 161 deletions

View File

@ -22,11 +22,23 @@ func DefaultConfig() types.Config {
LogLevel: "info",
},
LLM: types.LLMConfig{
Provider: "openai",
Provider: "deepseek",
Model: "deepseek-v4-flash",
BaseURL: "https://api.deepseek.com",
APIKey: "",
Adapter: "deepseek",
Temperature: 0.7,
MaxTokens: 4096,
Sources: []types.LLMSource{
{Name: "deepseek", BaseURL: "https://api.deepseek.com", Model: "deepseek-v4-flash", Adapter: "deepseek", AdapterPath: "adapters/deepseek.lua"},
{Name: "openai", BaseURL: "https://api.openai.com/v1", Model: "gpt-4o", Adapter: "openai", AdapterPath: "adapters/openai.lua"},
{Name: "anthropic", BaseURL: "https://api.anthropic.com", Model: "claude-sonnet-4-20250514", Adapter: "anthropic", AdapterPath: "adapters/anthropic.lua"},
{Name: "gemini", BaseURL: "https://generativelanguage.googleapis.com", Model: "gemini-2.0-flash", Adapter: "gemini", AdapterPath: "adapters/gemini.lua"},
{Name: "mistral", BaseURL: "https://api.mistral.ai", Model: "mistral-large-latest", Adapter: "mistral", AdapterPath: "adapters/mistral.lua"},
{Name: "groq", BaseURL: "https://api.groq.com", Model: "llama3-70b-8192", Adapter: "groq", AdapterPath: "adapters/groq.lua"},
{Name: "github", BaseURL: "https://models.inference.ai.azure.com", Model: "gpt-4o", Adapter: "github", AdapterPath: "adapters/github.lua"},
{Name: "ollama", BaseURL: "http://localhost:11434", Model: "llama3", Adapter: "ollama", AdapterPath: "adapters/ollama.lua"},
},
},
Defaults: types.AgentConfig{
Image: "homeagent/agent-base:latest",