|
...
|
...
|
@@ -112,7 +112,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { |
|
|
|
* @param emitter 流式返回
|
|
|
|
* @param questionText 问题原文本
|
|
|
|
* @param logRecord 日志对象
|
|
|
|
* @param chatSetting
|
|
|
|
* @param chatSetting 当前设置
|
|
|
|
* @return 返回是否匹配成功
|
|
|
|
*/
|
|
|
|
private boolean handleQuestionEmbeddingMatch(SseEmitter emitter, String questionText, AiragLog logRecord, AiragChatsetting chatSetting) throws Exception {
|
|
...
|
...
|
@@ -128,11 +128,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { |
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 发送token
|
|
|
|
* @param emitter 流式返回
|
|
|
|
* @param questionEmbedding 问题向量
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 发送token
|
|
|
|
* @param emitter 流式返回
|
|
...
|
...
|
@@ -146,7 +142,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { |
|
|
|
data.put("token", questionEmbedding.getAnswer());
|
|
|
|
emitter.send(SseEmitter.event().data(objectMapper.writeValueAsString(data)));
|
|
|
|
|
|
|
|
// 发送END事件(改为直接传Map)
|
|
|
|
// 发送END事件
|
|
|
|
Map<String, String> endData = createEndData(
|
|
|
|
questionEmbedding.getMetadata(),
|
|
|
|
String.valueOf(1 - questionEmbedding.getSimilarity())
|
...
|
...
|
|