fix: address review findings
CI / test (pull_request) Successful in 14s
CI / review (pull_request) Successful in 5m3s

- install.sh: verify SHA-256 checksum before installing binary
- install.sh: fallback to ~/.local/bin if /usr/local/bin not writable
- install.sh: use sed instead of grep for POSIX-safe JSON parsing
- release.yml: remove jq dependency, parse release ID with sed
- llm: make temperature configurable via --llm-temperature / LLM_TEMPERATURE
- llm: add WithTemperature builder method on Client
- llm: omit temperature from request when zero (uses server default)
This commit is contained in:
Rodin
2026-05-01 11:22:31 -07:00
parent b6277216f7
commit 4b3cac66c3
4 changed files with 82 additions and 9 deletions
+9
View File
@@ -14,6 +14,7 @@ type Client struct {
BaseURL string
APIKey string
Model string
Temperature float64
HTTP *http.Client
}
@@ -27,6 +28,13 @@ func NewClient(baseURL, apiKey, model string) *Client {
}
}
// WithTemperature sets the temperature for LLM requests.
// If not set (zero value), the server default is used.
func (c *Client) WithTemperature(t float64) *Client {
c.Temperature = t
return c
}
// Message represents a chat message.
type Message struct {
Role string `json:"role"`
@@ -53,6 +61,7 @@ type ChatResponse struct {
func (c *Client) Complete(messages []Message) (string, error) {
reqBody := ChatRequest{
Model: c.Model,
Temperature: c.Temperature,
Messages: messages,
}