summaryrefslogtreecommitdiff
path: root/internal/llmutils/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/llmutils/client.go')
-rw-r--r--internal/llmutils/client.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/llmutils/client.go b/internal/llmutils/client.go
index 2f3da55..53fca9c 100644
--- a/internal/llmutils/client.go
+++ b/internal/llmutils/client.go
@@ -24,6 +24,9 @@ func NewClientFromApp(cfg appconfig.App) (llm.Client, error) {
CopilotBaseURL: cfg.CopilotBaseURL,
CopilotModel: cfg.CopilotModel,
CopilotTemperature: cfg.CopilotTemperature,
+ AnthropicBaseURL: cfg.AnthropicBaseURL,
+ AnthropicModel: cfg.AnthropicModel,
+ AnthropicTemperature: cfg.AnthropicTemperature,
}
oaKey := os.Getenv("HEXAI_OPENAI_API_KEY")
if strings.TrimSpace(oaKey) == "" {
@@ -37,5 +40,9 @@ func NewClientFromApp(cfg appconfig.App) (llm.Client, error) {
if strings.TrimSpace(cpKey) == "" {
cpKey = os.Getenv("COPILOT_API_KEY")
}
- return llm.NewFromConfig(llmCfg, oaKey, orKey, cpKey)
+ anKey := os.Getenv("HEXAI_ANTHROPIC_API_KEY")
+ if strings.TrimSpace(anKey) == "" {
+ anKey = os.Getenv("ANTHROPIC_API_KEY")
+ }
+ return llm.NewFromConfig(llmCfg, oaKey, orKey, cpKey, anKey)
}