summaryrefslogtreecommitdiff
path: root/internal/hexaicli/run.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-18 09:11:20 +0300
committerPaul Buetow <paul@buetow.org>2025-08-18 09:11:20 +0300
commit3217d2738af345629e7da14c52fa4ee5cb288fe9 (patch)
tree29381af9217aabc8fb9029225bfd7650e8f20717 /internal/hexaicli/run.go
parent041d1f140436c6fdd223844b04c6592c84951878 (diff)
feat(config): per-provider temperature defaults and docs\n\n- Add , , to config with coding-friendly default 0.2.\n- Wire defaults through providers (OpenAI, Copilot, Ollama).\n- Update CLI and LSP runners to pass configured temperatures.\n- Document temperature behavior and examples in README.\n- Update config.json.example to show new keys.
Diffstat (limited to 'internal/hexaicli/run.go')
-rw-r--r--internal/hexaicli/run.go21
1 files changed, 12 insertions, 9 deletions
diff --git a/internal/hexaicli/run.go b/internal/hexaicli/run.go
index 11e64b3..839daef 100644
--- a/internal/hexaicli/run.go
+++ b/internal/hexaicli/run.go
@@ -68,15 +68,18 @@ func readInput(stdin io.Reader, args []string) (string, error) {
// newClientFromConfig builds an LLM client from the app config and env keys.
func newClientFromConfig(cfg appconfig.App) (llm.Client, error) {
- llmCfg := llm.Config{
- Provider: cfg.Provider,
- OpenAIBaseURL: cfg.OpenAIBaseURL,
- OpenAIModel: cfg.OpenAIModel,
- OllamaBaseURL: cfg.OllamaBaseURL,
- OllamaModel: cfg.OllamaModel,
- CopilotBaseURL: cfg.CopilotBaseURL,
- CopilotModel: cfg.CopilotModel,
- }
+ llmCfg := llm.Config{
+ Provider: cfg.Provider,
+ OpenAIBaseURL: cfg.OpenAIBaseURL,
+ OpenAIModel: cfg.OpenAIModel,
+ OpenAITemperature: cfg.OpenAITemperature,
+ OllamaBaseURL: cfg.OllamaBaseURL,
+ OllamaModel: cfg.OllamaModel,
+ OllamaTemperature: cfg.OllamaTemperature,
+ CopilotBaseURL: cfg.CopilotBaseURL,
+ CopilotModel: cfg.CopilotModel,
+ CopilotTemperature: cfg.CopilotTemperature,
+ }
oaKey := os.Getenv("OPENAI_API_KEY")
cpKey := os.Getenv("COPILOT_API_KEY")
return llm.NewFromConfig(llmCfg, oaKey, cpKey)