⬆️ huTool 依赖升级
⬆️ huTool 依赖升级
This commit is contained in:
commit
992b582ac8
11
pom.xml
11
pom.xml
@ -19,6 +19,7 @@
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<lucene.version>8.11.2</lucene.version>
|
||||
<hutool.version>5.8.22</hutool.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -305,12 +306,12 @@
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-core</artifactId>
|
||||
<version>5.8.20</version>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-http</artifactId>
|
||||
<version>5.8.20</version>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -328,7 +329,7 @@
|
||||
<dependency>
|
||||
<groupId>com.theokanning.openai-gpt3-java</groupId>
|
||||
<artifactId>client</artifactId>
|
||||
<version>0.14.0</version>
|
||||
<version>0.15.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.retrofit2</groupId>
|
||||
@ -439,7 +440,7 @@
|
||||
<profileActive>dev</profileActive>
|
||||
</properties>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
<profile>
|
||||
@ -448,7 +449,7 @@
|
||||
<profileActive>prod</profileActive>
|
||||
</properties>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
@ -86,6 +86,9 @@ public class OpenAiController {
|
||||
.build();
|
||||
service.streamChatCompletion(completionRequest).doOnError(Throwable::printStackTrace)
|
||||
.blockingForEach(chunk -> {
|
||||
if (chunk.getChoices().isEmpty() || chunk.getChoices().get(0).getMessage() == null) {
|
||||
return;
|
||||
}
|
||||
String text = chunk.getChoices().get(0).getMessage().getContent();
|
||||
if (text == null) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user