Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-10-14 09:18:45 +08:00
parent 8bc42cd121
commit 404d9f63d0
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -54,10 +54,10 @@ func ChatGPT(msg string, contextMsgs []string, c *openai.Client, model string, m
}
req := openai.ChatCompletionRequest{
Model: model,
MaxTokens: maxTokens,
Temperature: float32(temperature),
Messages: reqMsgs,
Model: model,
MaxCompletionTokens: maxTokens,
Temperature: float32(temperature),
Messages: reqMsgs,
}
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second)
defer cancel()