知识库查询
This commit is contained in:
@@ -273,16 +273,11 @@ public class AiChatServiceImpl implements AiChatService {
|
||||
if (StringUtils.hasText(conversation.getDifyConversationId())) {
|
||||
chatRequest.setConversationId(conversation.getDifyConversationId());
|
||||
}
|
||||
|
||||
// 设置知识库ID列表(从Redis获取)
|
||||
if (knowledgeIds != null && !knowledgeIds.isEmpty()) {
|
||||
chatRequest.setDatasetIds(knowledgeIds);
|
||||
log.info("使用知识库: {}", knowledgeIds);
|
||||
}
|
||||
|
||||
chatRequest.setResponseMode("streaming");
|
||||
Map<String, Object> inputs = new HashMap<>();
|
||||
inputs.put("connectInternet", agent.getConnectInternet());
|
||||
inputs.put("datasets", JSON.toJSONString(knowledgeIds));
|
||||
chatRequest.setInputs(inputs);
|
||||
chatRequest.setFiles(filesData);
|
||||
// 6. 调用Dify流式对话
|
||||
|
||||
Reference in New Issue
Block a user