| | |
| | | SMTLLMConnect llm = SMTAIServerApp.getApp().allocLLMConnect(null); |
| | | String answer = llm.callWithMessage(new String[] {prompt}, question, tranReq); |
| | | tranReq.traceLLMDebug(answer); |
| | | List<Json> jsonASTList = SMTStatic.convLLMAnswerToJson(answer, true).asJsonList(); |
| | | if (jsonASTList.size() > 0) { |
| | | Json ojsonASTList = SMTStatic.convLLMAnswerToJson(answer, true); |
| | | if(ojsonASTList != null && ojsonASTList.isArray()) |
| | | { |
| | | List<Json> jsonASTList = ojsonASTList.asJsonList(); |
| | | if (jsonASTList.size() > 0) |
| | | { |
| | | Json jsonAST = jsonASTList.get(0); |
| | | if ("query_water_fee".equals(jsonAST.safeGetStr("call", null))) { |
| | | jsonAST = jsonAST.getJson("args"); |
| | |
| | | SMTStatic.toDate(jsonAST.getJson("end_time").asString()) |
| | | }); |
| | | |
| | | if (recs.getRowCount() == 0) |
| | | if (recs.getRecord(0).getString(0) == null) |
| | | return "从" |
| | | + jsonAST.getJson("start_time").asString() |
| | | + "到" |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | answer = llm.callWithMessage(null, question, tranReq); |
| | | |
| | | return answer; |