Commit 3bd1ed52 authored by 赵啸非's avatar 赵啸非

修改配置文件

parent 2d43f251
...@@ -2,6 +2,7 @@ package com.mortals.xhx.thread; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.thread;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.mortals.xhx.webflux.factory.FlowChatContext; import com.mortals.xhx.webflux.factory.FlowChatContext;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -55,16 +56,16 @@ public class ChatMsgRspThread implements Runnable { ...@@ -55,16 +56,16 @@ public class ChatMsgRspThread implements Runnable {
obj.put("delta", delta); obj.put("delta", delta);
obj.put("index", 0); obj.put("index", 0);
obj.put("finish_reason", "null"); obj.put("finish_reason", null);
jsonArray.add(obj); jsonArray.add(obj);
rspJson.put("choices", jsonArray); rspJson.put("choices", jsonArray);
rspJson.put("object", ""); rspJson.put("object", "");
log.info("快速响应线程写入数据,rsp:{}", rspJson.toJSONString()); log.info("快速响应线程写入数据,rsp:{}", rspJson.toJSONString(SerializerFeature.WriteMapNullValue));
// context.getEmitter().next("data:"+rspJson.toJSONString()); // context.getEmitter().next("data:"+rspJson.toJSONString());
context.getEmitter().next(rspJson.toJSONString()); context.getEmitter().next(rspJson.toJSONString(SerializerFeature.WriteMapNullValue));
reCount++; reCount++;
try { try {
Thread.sleep(1000); Thread.sleep(1000);
......
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