Update OpenAiController.java

This commit is contained in:
ronger 2024-07-05 19:04:17 +08:00 committed by GitHub
parent 57e19c9920
commit bb19d5e6a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,7 +80,7 @@ public class OpenAiController {
boolean isAdmin = UserUtils.isAdmin(user.getEmail()); boolean isAdmin = UserUtils.isAdmin(user.getEmail());
OpenAiService service = new OpenAiService(token, Duration.ofSeconds(180)); OpenAiService service = new OpenAiService(token, Duration.ofSeconds(180));
ChatCompletionRequest completionRequest = ChatCompletionRequest.builder() ChatCompletionRequest completionRequest = ChatCompletionRequest.builder()
.model(isAdmin ? "gpt-4o" : "gpt-3.5-turbo-16k-0613") .model("gpt-3.5-turbo-16k-0613")
.stream(true) .stream(true)
.messages(list) .messages(list)
.build(); .build();