|
|
@@ -55,7 +55,6 @@ public class ChatController {
|
|
|
return ResponseEntity.ok(Map.of(
|
|
|
"answer", answer,
|
|
|
"sources", sources,
|
|
|
- "conversation_id", cid,
|
|
|
"intent", intent
|
|
|
));
|
|
|
}
|
|
|
@@ -90,8 +89,7 @@ public class ChatController {
|
|
|
try {
|
|
|
String meta = new com.fasterxml.jackson.databind.ObjectMapper().writeValueAsString(Map.of(
|
|
|
"intent", intent,
|
|
|
- "sources", sources,
|
|
|
- "cid", cid
|
|
|
+ "sources", sources
|
|
|
));
|
|
|
sink.tryEmitNext(ServerSentEvent.<String>builder().event("meta").data(meta).build());
|
|
|
} catch (Exception ignored) {}
|
|
|
@@ -173,8 +171,7 @@ public class ChatController {
|
|
|
.map(d -> Map.<String, Object>of(
|
|
|
"name", d.getOrDefault("source", ""),
|
|
|
"section", d.getOrDefault("section", ""),
|
|
|
- "source", d.getOrDefault("source", ""),
|
|
|
- "score", d.getOrDefault("similarity", 0)
|
|
|
+ "source", d.getOrDefault("source", "")
|
|
|
))
|
|
|
.collect(Collectors.toList());
|
|
|
}
|