Skip to content

Commit

Permalink
Don't cap the max tokens on OpenAI
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Feb 24, 2024
1 parent c28c397 commit 8446f03
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/internal/engine/openai/engine_openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ func (this *OpenAiEngineBackend) Process(work *types.Request, model *data.Model,
ctx := context.Background()

req := openai.ChatCompletionRequest{
Model: model.InternalModelID,
MaxTokens: 500,
Model: model.InternalModelID,
Messages: slices.Map(work.Messages, func(m data.Message) openai.ChatCompletionMessage {
openaiRole := openai.ChatMessageRoleUser
if m.Role == role.Assistant {
Expand Down

0 comments on commit 8446f03

Please sign in to comment.