set maxcompletiontokens (#1260)

This commit is contained in:
Mike Sawka 2024-11-11 10:52:59 -08:00 committed by GitHub
parent 3a21d3183c
commit 38eeba5bd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -267,6 +267,7 @@ func RunLocalCompletionStream(ctx context.Context, request wshrpc.OpenAiStreamRe
Model: request.Opts.Model, Model: request.Opts.Model,
Messages: ConvertPrompt(request.Prompt), Messages: ConvertPrompt(request.Prompt),
MaxTokens: request.Opts.MaxTokens, MaxTokens: request.Opts.MaxTokens,
MaxCompletionTokens: request.Opts.MaxTokens,
Stream: true, Stream: true,
} }
if request.Opts.MaxChoices > 1 { if request.Opts.MaxChoices > 1 {