mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
8bc42cd121
commit
404d9f63d0
1 changed files with 4 additions and 4 deletions
|
|
@ -54,10 +54,10 @@ func ChatGPT(msg string, contextMsgs []string, c *openai.Client, model string, m
|
||||||
}
|
}
|
||||||
|
|
||||||
req := openai.ChatCompletionRequest{
|
req := openai.ChatCompletionRequest{
|
||||||
Model: model,
|
Model: model,
|
||||||
MaxTokens: maxTokens,
|
MaxCompletionTokens: maxTokens,
|
||||||
Temperature: float32(temperature),
|
Temperature: float32(temperature),
|
||||||
Messages: reqMsgs,
|
Messages: reqMsgs,
|
||||||
}
|
}
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue