v1.3.0 - Fixes with new endpoint

This commit is contained in:
ohAlee 2024-02-11 12:35:30 +01:00
parent f8eeb5456b
commit 8878ddf5e5
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ public class OpenAI {
} }
public static CompletableFuture<String> getResponse(ConfigurationSection section, List<ChatMessage> chatMessages, String message) { public static CompletableFuture<String> getResponse(ConfigurationSection section, List<ChatMessage> chatMessages, String message) {
chatMessages.add(new ChatMessage("Human", message)); chatMessages.add(new ChatMessage("user", message));
return CompletableFuture.supplyAsync(() -> { return CompletableFuture.supplyAsync(() -> {
String model = section.getString("model", "text-davinci-003"); String model = section.getString("model", "text-davinci-003");
@ -42,7 +42,7 @@ public class OpenAI {
.build()) .build())
.getChoices().get(0).getMessage().getContent(); .getChoices().get(0).getMessage().getContent();
chatMessages.add(new ChatMessage("AI", reply)); chatMessages.add(new ChatMessage("assistant", reply));
return reply; return reply;
}).exceptionally(throwable -> { }).exceptionally(throwable -> {
if (throwable.getCause() instanceof HttpException e) { if (throwable.getCause() instanceof HttpException e) {

View File

@ -14,7 +14,7 @@ format:
chatgpt: chatgpt:
# https://platform.openai.com/docs/models/ # https://platform.openai.com/docs/models/
model: "text-davinci-003" model: "gpt-3.5-turbo"
temperature: 0.9 temperature: 0.9
max-tokens: 150 max-tokens: 150
top-p: 1.0 top-p: 1.0