mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
set maxcompletiontokens (#1260)
This commit is contained in:
parent
3a21d3183c
commit
38eeba5bd2
@ -264,10 +264,11 @@ func RunLocalCompletionStream(ctx context.Context, request wshrpc.OpenAiStreamRe
|
|||||||
}
|
}
|
||||||
client := openaiapi.NewClientWithConfig(clientConfig)
|
client := openaiapi.NewClientWithConfig(clientConfig)
|
||||||
req := openaiapi.ChatCompletionRequest{
|
req := openaiapi.ChatCompletionRequest{
|
||||||
Model: request.Opts.Model,
|
Model: request.Opts.Model,
|
||||||
Messages: ConvertPrompt(request.Prompt),
|
Messages: ConvertPrompt(request.Prompt),
|
||||||
MaxTokens: request.Opts.MaxTokens,
|
MaxTokens: request.Opts.MaxTokens,
|
||||||
Stream: true,
|
MaxCompletionTokens: request.Opts.MaxTokens,
|
||||||
|
Stream: true,
|
||||||
}
|
}
|
||||||
if request.Opts.MaxChoices > 1 {
|
if request.Opts.MaxChoices > 1 {
|
||||||
req.N = request.Opts.MaxChoices
|
req.N = request.Opts.MaxChoices
|
||||||
|
Loading…
Reference in New Issue
Block a user