fix: remove hardcoded temperature (unsupported by GPT-5)
CI / test (pull_request) Successful in 14s
CI / review (pull_request) Successful in 4m56s

GPT-5 via SAP AI Core only supports temperature=1 (default).
Remove the hardcoded 0.1 and use omitempty so the field is not sent.
This commit is contained in:
Rodin
2026-05-01 11:15:08 -07:00
parent 99916fe24a
commit b6277216f7
+2 -2
View File
@@ -37,7 +37,7 @@ type Message struct {
type ChatRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Temperature float64 `json:"temperature"`
Temperature float64 `json:"temperature,omitempty"`
}
// ChatResponse is the response from the API.
@@ -54,7 +54,7 @@ func (c *Client) Complete(messages []Message) (string, error) {
reqBody := ChatRequest{
Model: c.Model,
Messages: messages,
Temperature: 0.1,
}
data, err := json.Marshal(reqBody)