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)
|
||||
req := openaiapi.ChatCompletionRequest{
|
||||
Model: request.Opts.Model,
|
||||
Messages: ConvertPrompt(request.Prompt),
|
||||
MaxTokens: request.Opts.MaxTokens,
|
||||
Stream: true,
|
||||
Model: request.Opts.Model,
|
||||
Messages: ConvertPrompt(request.Prompt),
|
||||
MaxTokens: request.Opts.MaxTokens,
|
||||
MaxCompletionTokens: request.Opts.MaxTokens,
|
||||
Stream: true,
|
||||
}
|
||||
if request.Opts.MaxChoices > 1 {
|
||||
req.N = request.Opts.MaxChoices
|
||||
|
Loading…
Reference in New Issue
Block a user