Commit 854af735 authored by 赵啸非's avatar 赵啸非

修改配置文件

parent 6b8fd9bc
......@@ -29,16 +29,12 @@ public class ChatMsgRspThread implements Runnable {
@Override
public void run() {
log.info("快速响应线程开始,msgId:{}", context.getMsgId());
StringBuilder answer = context.getAnswer();
int reCount = 0;
while (reCount < MAX_RETRY_COUNT) {
if (!answer.toString().isEmpty()) {
log.info("快速响应线程结束 answer:{}", answer);
break;
}
//创建一个初始化的answer
......@@ -55,7 +51,6 @@ public class ChatMsgRspThread implements Runnable {
if(reCount == 0){
delta.put("role", "assistant");
}
delta.put("content", "");
obj.put("delta", delta);
......
......@@ -63,7 +63,7 @@ public class FlowChatSubscriber implements Subscriber<String>, Disposable {
if (ObjectUtils.isEmpty(rsp)) {
this.stopFlag = true;
}
// log.info(" onNext rsp:{}", rsp);
log.info(" onNext rsp:{}", rsp);
} catch (Exception e) {
log.error("流式问答异常:{}", e.getMessage());
} finally {
......
......@@ -51,7 +51,6 @@ public class BaseChatService extends AbstractFlowChatTemplate {
@Override
public String onNext(String data, FlowChatContext context) {
if (StrUtil.equals("[DONE]", data)) {//[DONE]是消息结束标识
return null;
}
......@@ -60,7 +59,6 @@ public class BaseChatService extends AbstractFlowChatTemplate {
if (bodyJson == null) {
return data;
}
/*if(ObjectUtils.isEmpty(context.getAnswer())){
//创建一个初始化的answer
JSONObject rspJson = new JSONObject();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment