Commit 75b396def4ff3fd08877327427ed341fa6e8e62a
1 parent
57dbbfae
添加向量库
Showing
2 changed files
with
5 additions
and
5 deletions
src/main/java/com/xly/milvus/service/impl/AiGlobalAgentQuestionSqlEmitterServiceImpl.java
| @@ -83,11 +83,10 @@ public class AiGlobalAgentQuestionSqlEmitterServiceImpl implements AiGlobalAgent | @@ -83,11 +83,10 @@ public class AiGlobalAgentQuestionSqlEmitterServiceImpl implements AiGlobalAgent | ||
| 83 | .build(); | 83 | .build(); |
| 84 | 84 | ||
| 85 | InsertResp insertResp = milvusClient.insert(insertReq); | 85 | InsertResp insertResp = milvusClient.insert(insertReq); |
| 86 | - if(insertResp.getInsertCnt()>0){ | ||
| 87 | - //调用数据库插入数据库 | ||
| 88 | - Map<String, Object> searMap = dynamicExeDbService.getDoProMap(sProName, data); | ||
| 89 | - dynamicExeDbService.getCallPro(searMap, sProName); | ||
| 90 | - } | 86 | + //调用数据库插入数据库 |
| 87 | + Map<String, Object> searMap = dynamicExeDbService.getDoProMap(sProName, data); | ||
| 88 | + dynamicExeDbService.getCallPro(searMap, sProName); | ||
| 89 | + | ||
| 91 | System.out.println("成功插入 " + insertResp.getInsertCnt() + " 条数据"); | 90 | System.out.println("成功插入 " + insertResp.getInsertCnt() + " 条数据"); |
| 92 | System.out.println(" - 数据预览:"); | 91 | System.out.println(" - 数据预览:"); |
| 93 | } | 92 | } |
src/main/java/com/xly/thread/AiUserAgentQuestionThread.java
| @@ -47,6 +47,7 @@ public class AiUserAgentQuestionThread implements Runnable { | @@ -47,6 +47,7 @@ public class AiUserAgentQuestionThread implements Runnable { | ||
| 47 | data.put("sQuestion",SqlValidateUtil.getsQuestion(session.getSUserQuestionList())); | 47 | data.put("sQuestion",SqlValidateUtil.getsQuestion(session.getSUserQuestionList())); |
| 48 | data.put("sId",new UUIDGenerator().next()); | 48 | data.put("sId",new UUIDGenerator().next()); |
| 49 | data.put("cachType",cachType); | 49 | data.put("cachType",cachType); |
| 50 | + data.put("userInput",sQuestion); | ||
| 50 | //插入Redis缓存 | 51 | //插入Redis缓存 |
| 51 | if(bRedis==1 && ObjectUtil.isNotEmpty(sSqlContent)){ | 52 | if(bRedis==1 && ObjectUtil.isNotEmpty(sSqlContent)){ |
| 52 | String sReidKey = SqlValidateUtil.getsKey( sSceneId, sMethodId, sQuestionGroupNo); | 53 | String sReidKey = SqlValidateUtil.getsKey( sSceneId, sMethodId, sQuestionGroupNo); |