fix: when reasoningEffort = "", no "reasoning" field
This commit is contained in:
@@ -32,10 +32,13 @@ func OpenaiStreamChatResponses(
|
||||
Model: model,
|
||||
Input: msgs,
|
||||
Temperature: temperature,
|
||||
Reasoning: OpenaiResponseReasoning{Effort: reasoningEffort},
|
||||
Stream: true,
|
||||
}
|
||||
|
||||
if reasoningEffort != "" {
|
||||
body.Reasoning = &OpenaiResponseReasoning{Effort: reasoningEffort}
|
||||
}
|
||||
|
||||
payload, err := json.Marshal(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user