正在显示
1 个修改的文件
包含
3 行增加
和
7 行删除
| @@ -112,7 +112,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { | @@ -112,7 +112,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { | ||
| 112 | * @param emitter 流式返回 | 112 | * @param emitter 流式返回 |
| 113 | * @param questionText 问题原文本 | 113 | * @param questionText 问题原文本 |
| 114 | * @param logRecord 日志对象 | 114 | * @param logRecord 日志对象 |
| 115 | - * @param chatSetting | 115 | + * @param chatSetting 当前设置 |
| 116 | * @return 返回是否匹配成功 | 116 | * @return 返回是否匹配成功 |
| 117 | */ | 117 | */ |
| 118 | private boolean handleQuestionEmbeddingMatch(SseEmitter emitter, String questionText, AiragLog logRecord, AiragChatsetting chatSetting) throws Exception { | 118 | private boolean handleQuestionEmbeddingMatch(SseEmitter emitter, String questionText, AiragLog logRecord, AiragChatsetting chatSetting) throws Exception { |
| @@ -128,11 +128,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { | @@ -128,11 +128,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { | ||
| 128 | return true; | 128 | return true; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | - /** | ||
| 132 | - * 发送token | ||
| 133 | - * @param emitter 流式返回 | ||
| 134 | - * @param questionEmbedding 问题向量 | ||
| 135 | - */ | 131 | + |
| 136 | /** | 132 | /** |
| 137 | * 发送token | 133 | * 发送token |
| 138 | * @param emitter 流式返回 | 134 | * @param emitter 流式返回 |
| @@ -146,7 +142,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { | @@ -146,7 +142,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { | ||
| 146 | data.put("token", questionEmbedding.getAnswer()); | 142 | data.put("token", questionEmbedding.getAnswer()); |
| 147 | emitter.send(SseEmitter.event().data(objectMapper.writeValueAsString(data))); | 143 | emitter.send(SseEmitter.event().data(objectMapper.writeValueAsString(data))); |
| 148 | 144 | ||
| 149 | - // 发送END事件(改为直接传Map) | 145 | + // 发送END事件 |
| 150 | Map<String, String> endData = createEndData( | 146 | Map<String, String> endData = createEndData( |
| 151 | questionEmbedding.getMetadata(), | 147 | questionEmbedding.getMetadata(), |
| 152 | String.valueOf(1 - questionEmbedding.getSimilarity()) | 148 | String.valueOf(1 - questionEmbedding.getSimilarity()) |
-
请 注册 或 登录 后发表评论