Skip to content

Commit

Permalink
Fix support for GPT-4.
Browse files Browse the repository at this point in the history
  • Loading branch information
cube2222 committed Apr 11, 2023
1 parent e222fbc commit bdc63a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ func (a *App) runChainOfMessages(conversationID int) (err error) {
}
}()

settings, err := a.getSettingsRaw()
if err != nil {
return fmt.Errorf("couldn't get settings: %w", err)
}

stop := []string{"Observation", "Response"}
retries := 0
for {
Expand All @@ -210,7 +215,7 @@ func (a *App) runChainOfMessages(conversationID int) (err error) {
return fmt.Errorf("couldn't convert messages to GPT messages: %w", err)
}
stream, err := a.openAICli().CreateChatCompletionStream(genCtx, openai.ChatCompletionRequest{
Model: openai.GPT3Dot5Turbo,
Model: settings.Model,
MaxTokens: 500,
Temperature: 0.7,
TopP: 1,
Expand Down

0 comments on commit bdc63a9

Please sign in to comment.