|
@@ -114,7 +114,7 @@ public class DifyService {
|
|
|
DifyType difyType = difyTypeDao.get(difyTypeId);
|
|
|
|
|
|
// 创建工作流客户端
|
|
|
- DifyWorkflowClient workFlowClient = DifyClientFactory.createWorkflowClient("http://203.110.233.149:9000/v1", difyType.getApiKey());
|
|
|
+ DifyWorkflowClient workFlowClient = DifyClientFactory.createWorkflowClient("http://203.110.233.149:80/v1", difyType.getApiKey());
|
|
|
|
|
|
// 创建工作流请求
|
|
|
WorkflowRunRequest request = WorkflowRunRequest.builder()
|
|
@@ -201,7 +201,7 @@ public class DifyService {
|
|
|
DifyType difyType = difyTypeDao.get(difyTypeId);
|
|
|
|
|
|
// 创建工作流客户端
|
|
|
- DifyWorkflowClient workFlowClient = DifyClientFactory.createWorkflowClient("http://203.110.233.149:9000/v1", difyType.getApiKey());
|
|
|
+ DifyWorkflowClient workFlowClient = DifyClientFactory.createWorkflowClient("http://203.110.233.149:80/v1", difyType.getApiKey());
|
|
|
|
|
|
WorkflowRunStatusResponse statusResponse = null;
|
|
|
|
|
@@ -260,7 +260,7 @@ public class DifyService {
|
|
|
difyCompletionDao.save(difyCompletion);
|
|
|
|
|
|
|
|
|
- DifyCompletionClient completionClient = DifyClientFactory.createCompletionClient("http://203.110.233.149:9000/v1", difyType.getApiKey());
|
|
|
+ DifyCompletionClient completionClient = DifyClientFactory.createCompletionClient("http://203.110.233.149:80/v1", difyType.getApiKey());
|
|
|
|
|
|
CompletionRequest request = CompletionRequest.builder()
|
|
|
.inputs(inputs)
|
|
@@ -343,7 +343,7 @@ public class DifyService {
|
|
|
difyChatDao.save(difyChat);
|
|
|
|
|
|
// 创建聊天客户端
|
|
|
- DifyChatflowClient chatClient = DifyClientFactory.createChatWorkflowClient("http://203.110.233.149:9000/v1", difyType.getApiKey());
|
|
|
+ DifyChatflowClient chatClient = DifyClientFactory.createChatWorkflowClient("http://203.110.233.149:80/v1", difyType.getApiKey());
|
|
|
|
|
|
// 创建聊天消息
|
|
|
ChatMessage message = ChatMessage.builder()
|
|
@@ -528,7 +528,7 @@ public class DifyService {
|
|
|
difyChatDao.save(difyChat);
|
|
|
|
|
|
// 创建聊天客户端
|
|
|
- DifyChatflowClient chatClient = DifyClientFactory.createChatWorkflowClient("http://203.110.233.149:9000/v1", difyType.getApiKey());
|
|
|
+ DifyChatflowClient chatClient = DifyClientFactory.createChatWorkflowClient("http://203.110.233.149:80/v1", difyType.getApiKey());
|
|
|
|
|
|
// 创建聊天消息
|
|
|
ChatMessage message = ChatMessage.builder()
|
|
@@ -724,7 +724,7 @@ public class DifyService {
|
|
|
UserContext userContext = ContextUtils.getUserContext();
|
|
|
|
|
|
// 创建聊天客户端
|
|
|
- DifyChatClient chatClient = DifyClientFactory.createChatClient("http://203.110.233.149:9000/v1", difyType.getApiKey());
|
|
|
+ DifyChatClient chatClient = DifyClientFactory.createChatClient("http://203.110.233.149:80/v1", difyType.getApiKey());
|
|
|
|
|
|
// 获取会话历史消息
|
|
|
try {
|
|
@@ -749,7 +749,7 @@ public class DifyService {
|
|
|
UserContext userContext = ContextUtils.getUserContext();
|
|
|
|
|
|
// 创建聊天客户端
|
|
|
- DifyChatClient chatClient = DifyClientFactory.createChatClient("http://203.110.233.149:9000/v1", difyType.getApiKey());
|
|
|
+ DifyChatClient chatClient = DifyClientFactory.createChatClient("http://203.110.233.149:80/v1", difyType.getApiKey());
|
|
|
// 获取会话列表
|
|
|
try {
|
|
|
ConversationListResponse conversations = chatClient.getConversations(userContext.getUserName() + "-" + userContext.getUserId(), lastId, limit, "-updated_at");
|
|
@@ -774,7 +774,7 @@ public class DifyService {
|
|
|
UserContext userContext = ContextUtils.getUserContext();
|
|
|
|
|
|
// 创建聊天客户端
|
|
|
- DifyChatClient chatClient = DifyClientFactory.createChatClient("http://203.110.233.149:9000/v1", difyType.getApiKey());
|
|
|
+ DifyChatClient chatClient = DifyClientFactory.createChatClient("http://203.110.233.149:80/v1", difyType.getApiKey());
|
|
|
|
|
|
// 删除会话
|
|
|
try {
|
|
@@ -800,7 +800,7 @@ public class DifyService {
|
|
|
Map data = new HashMap();
|
|
|
data.put("file", toFile);
|
|
|
data.put("user", userContext.getUserName() + "-" + userContext.getUserId());
|
|
|
- String body = HttpRequest.post("http://203.110.233.149:9000/v1/files/upload")
|
|
|
+ String body = HttpRequest.post("http://203.110.233.149:80/v1/files/upload")
|
|
|
.header("Authorization", "Bearer "+ difyType.getApiKey())
|
|
|
.form(data)
|
|
|
.contentType("multipart/form-data")
|