feat:add github_copilot to providers factory
This commit is contained in:
parent
5faa67b77d
commit
0aab8d8afc
1 changed files with 10 additions and 0 deletions
|
|
@ -314,7 +314,17 @@ func CreateProvider(cfg *config.Config) (LLMProvider, error) {
|
||||||
model = "deepseek-chat"
|
model = "deepseek-chat"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case "github_copilot", "copilot":
|
||||||
|
if cfg.Providers.GitHubCopilot.APIBase != "" {
|
||||||
|
apiBase = cfg.Providers.GitHubCopilot.APIBase
|
||||||
|
}else {
|
||||||
|
apiBase = "localhost:4321" // no `http://` beacause grpc mode`
|
||||||
|
}
|
||||||
|
return NewGitHubCopilotProvider(apiBase, cfg.Providers.GitHubCopilot.ConnectMode, model), nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback: detect provider from model name
|
// Fallback: detect provider from model name
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue