fix: remove hardcoded temperature (unsupported by GPT-5)
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:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user