|
@@ -22,8 +22,8 @@ import java.util.stream.Collectors;
|
|
|
import com.etotem.cfc.util.SortUtil;
|
|
import com.etotem.cfc.util.SortUtil;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Dify AI API 封装
|
|
|
|
|
- * 对接 http://dify.bianwoyou.cn/v1 的 Chatbot Conversation API
|
|
|
|
|
|
|
+ * LangGraph AI API 封装
|
|
|
|
|
+ * 对接 Python LangGraph Sidecar 的 Chat 接口
|
|
|
*/
|
|
*/
|
|
|
@Service
|
|
@Service
|
|
|
public class AIService {
|
|
public class AIService {
|
|
@@ -93,7 +93,7 @@ public class AIService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 发送聊天消息: 统一走 Python LangGraph(不含 Dify 备选)
|
|
|
|
|
|
|
+ * 发送聊天消息: 统一走 Python LangGraph
|
|
|
*/
|
|
*/
|
|
|
public Map<String, Object> sendMessage(String query, String userId,
|
|
public Map<String, Object> sendMessage(String query, String userId,
|
|
|
String conversationId,
|
|
String conversationId,
|
|
@@ -216,9 +216,9 @@ public class AIService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 调用 Dify Workflow API(阻塞模式)
|
|
|
|
|
|
|
+ * 调用 LangGraph Workflow API(阻塞模式)
|
|
|
*
|
|
*
|
|
|
- * @param workflowId Dify 工作流 ID
|
|
|
|
|
|
|
+ * @param workflowId LangGraph 工作流 ID
|
|
|
* @param inputs 工作流输入变量
|
|
* @param inputs 工作流输入变量
|
|
|
* @param userId 用户标识
|
|
* @param userId 用户标识
|
|
|
* @return workflow outputs
|
|
* @return workflow outputs
|