| | |
| | | this.addWorkflow(entity.getId(), LlmApplicationAppIdEnum.REFERENCE_ANSWER.getCode(),null,createTime); |
| | | this.addWorkflow(entity.getId(), LlmApplicationAppIdEnum.KEY_KNOWLEDGE.getCode(),null,createTime); |
| | | this.addWorkflow(entity.getId(), LlmApplicationAppIdEnum.REPORT.getCode(),null,createTime); |
| | | this.addWorkflow(entity.getId(), LlmApplicationAppIdEnum.CONTEXT_TALK.getCode(),null,createTime); |
| | | this.addWorkflow(entity.getId(), LlmApplicationAppIdEnum.ADMIN_QUESTION.getCode(),null,createTime); |
| | | |
| | | String categoryId = ""; |
| | |
| | | |
| | | String knowledgeId = ""; |
| | | try { |
| | | Client client = KnowledgeBaseUtil.createClient(); |
| | | String workspaceId = KnowledgeBaseUtil.WORKSPACE_ID; |
| | | String name = entity.getName(); |
| | | String sourceType = "DATA_CENTER_FILE"; |
| | | String structureType = "unstructured"; |
| | | String sinkType = "DEFAULT"; |
| | | String fileId = "file_b7d0a5b2df1745b9bfb7402f5fe1054f_12629554"; |
| | | CreateIndexResponse indexResponse = KnowledgeBaseUtil.createIndex(client, workspaceId, fileId, name, structureType, sourceType, sinkType); |
| | | knowledgeId = indexResponse.getBody().getData().getId(); |
| | | knowledgeId = KnowledgeBaseUtil.createKnowledgeBase(fileId, name); |
| | | } catch (Exception e) { |
| | | throw new FebsException("初始化知识库失败"); |
| | | } |