Skip to content

Commit f189b97

Browse files
author
guorutao
committed
feat 1.1.2 新版接口开发
1 parent b6dcc04 commit f189b97

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/test/java/com/unfbx/chatgpt/OpenAiClientFunctionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void chatFunction() {
121121
.messages(Collections.singletonList(message))
122122
.functions(Collections.singletonList(functions))
123123
.functionCall("auto")
124-
.model(ChatCompletion.Model.GPT_3_5_TURBO_16K_0613.getName())
124+
.model(ChatCompletion.Model.GPT_4_1106_PREVIEW.getName())
125125
.build();
126126
ChatCompletionResponse chatCompletionResponse = openAiClient.chatCompletion(chatCompletion);
127127

@@ -149,7 +149,7 @@ public void chatFunction() {
149149
ChatCompletion chatCompletionV2 = ChatCompletion
150150
.builder()
151151
.messages(messageList)
152-
.model(ChatCompletion.Model.GPT_3_5_TURBO_16K_0613.getName())
152+
.model(ChatCompletion.Model.GPT_4_1106_PREVIEW.getName())
153153
.build();
154154
ChatCompletionResponse chatCompletionResponseV2 = openAiClient.chatCompletion(chatCompletionV2);
155155
log.info("自定义的方法返回值:{}",chatCompletionResponseV2.getChoices().get(0).getMessage().getContent());

src/test/java/com/unfbx/chatgpt/PluginTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void plugin() {
7878
messages.add(message2);
7979
//默认模型:GPT_3_5_TURBO_16K_0613
8080
//有四个重载方法,都可以使用
81-
ChatCompletionResponse response = openAiClient.chatCompletionWithPlugin(messages, plugin);
81+
ChatCompletionResponse response = openAiClient.chatCompletionWithPlugin(messages, ChatCompletion.Model.GPT_4_1106_PREVIEW.getName(), plugin);
8282
log.info("自定义的方法返回值:{}", response.getChoices().get(0).getMessage().getContent());
8383
}
8484

@@ -103,7 +103,7 @@ public void streamPlugin() {
103103
messages.add(message2);
104104
//默认模型:GPT_3_5_TURBO_16K_0613
105105
//有四个重载方法,都可以使用
106-
openAiStreamClient.streamChatCompletionWithPlugin(messages, new ConsoleEventSourceListener(), plugin);
106+
openAiStreamClient.streamChatCompletionWithPlugin(messages, ChatCompletion.Model.GPT_4_1106_PREVIEW.getName(), new ConsoleEventSourceListener(), plugin);
107107
CountDownLatch countDownLatch = new CountDownLatch(1);
108108
try {
109109
countDownLatch.await();

0 commit comments

Comments
 (0)