Commit aab34c38 authored by wangning's avatar wangning

fix 智能体

parent 3773ea17
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="26f8285c-12a3-40dc-b957-23c37b8f3c67" name="Changes" comment="fix 智能体知识库 提示词"> <list default="true" id="26f8285c-12a3-40dc-b957-23c37b8f3c67" name="Changes" comment="fix 智能体知识库">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/domain/constant/AlgoConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/domain/constant/AlgoConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/domain/constant/ChatConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/domain/constant/ChatConstants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/service/chatService/ChatServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/service/chatService/ChatServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/utils/AgentFileReader.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/utils/AgentFileReader.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/application-wn.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-wn.yml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/resources/application-wn.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-wn.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/promptwords/algosuggest/algo_suggest.txt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/promptwords/algosuggest/algo_suggest.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/testcases/algo_knowledge/algo_knowledge_260121.jsonl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/testcases/algo_knowledge/algo_knowledge_260121.jsonl" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/testcases/test_result/res1.xlsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/testcases/test_result/result.xlsx" beforeDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -130,14 +130,34 @@ ...@@ -130,14 +130,34 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1769008126595</updated> <updated>1769008126595</updated>
</task> </task>
<option name="localTasksCounter" value="5" /> <task id="LOCAL-00005" summary="fix 智能体知识库">
<option name="closed" value="true" />
<created>1769010368548</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1769010368548</updated>
</task>
<option name="localTasksCounter" value="6" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="fix" /> <MESSAGE value="fix" />
<MESSAGE value="fix 智能体知识库 问题" /> <MESSAGE value="fix 智能体知识库 问题" />
<MESSAGE value="fix 智能体知识库 提示词" /> <MESSAGE value="fix 智能体知识库 提示词" />
<option name="LAST_COMMIT_MESSAGE" value="fix 智能体知识库 提示词" /> <MESSAGE value="fix 智能体知识库" />
<option name="LAST_COMMIT_MESSAGE" value="fix 智能体知识库" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<watches-manager> <watches-manager>
......
...@@ -18,7 +18,7 @@ public class AlgoConfig { ...@@ -18,7 +18,7 @@ public class AlgoConfig {
public static final String INTENT_PROMPT = TxtFileReader.readFile("promptwords/0_0_0.txt"); public static final String INTENT_PROMPT = TxtFileReader.readFile("promptwords/0_0_0.txt");
public static final String RECOGNIZE_ALGO_NAME = TxtFileReader.readFile("promptwords/0_1.txt"); public static final String RECOGNIZE_ALGO_NAME = TxtFileReader.readFile("promptwords/algosuggest/algo_suggest.txt");
public static final String ALGO_1 = TxtFileReader.readFile("promptwords/1.txt"); public static final String ALGO_1 = TxtFileReader.readFile("promptwords/1.txt");
......
...@@ -25,7 +25,7 @@ public class ChatConstants { ...@@ -25,7 +25,7 @@ public class ChatConstants {
public static final String MESSAGE = "message"; public static final String MESSAGE = "message";
public static final String USER_PROMPT = "\n【用户需求】\n"; public static final String USER_PROMPT = "\n\n【用户需求】\n";
public static final String DATA_STATUS = "【当前状态】"; public static final String DATA_STATUS = "【当前状态】";
......
...@@ -195,6 +195,8 @@ public class ChatServiceImpl implements BaseChatService { ...@@ -195,6 +195,8 @@ public class ChatServiceImpl implements BaseChatService {
requestParams.updateDataId(dataId); requestParams.updateDataId(dataId);
String rawSample = agentFileReader.readCsvFileByDataId(dataId, userChatMessage.getUserId()); String rawSample = agentFileReader.readCsvFileByDataId(dataId, userChatMessage.getUserId());
log.debug("==================rawSample=================");
log.debug(rawSample);
String data = DataSummaryUtil.buildSummary(rawSample); String data = DataSummaryUtil.buildSummary(rawSample);
requestParams.setDataSummary(data); // 保存数据概要供后续自动参数生成使用 requestParams.setDataSummary(data); // 保存数据概要供后续自动参数生成使用
log.debug("Loaded data sample for dataId={} summary length={}", dataId, data.length()); log.debug("Loaded data sample for dataId={} summary length={}", dataId, data.length());
......
...@@ -31,7 +31,7 @@ public class AgentFileReader { ...@@ -31,7 +31,7 @@ public class AgentFileReader {
String line; String line;
int lineCount = 0; int lineCount = 0;
while ((line = reader.readLine()) != null && lineCount < 4) { // 表头 + 前三行数据 while ((line = reader.readLine()) != null ) { // 表头 + 前三行数据
if (lineCount > 0) { if (lineCount > 0) {
result.append("/n"); // 行间分隔符 result.append("/n"); // 行间分隔符
} }
......
...@@ -44,7 +44,7 @@ mybatis: ...@@ -44,7 +44,7 @@ mybatis:
logging: logging:
level: level:
# 业务代码包日志级别(可改为 INFO/DEBUG/WARN/ERROR) # 业务代码包日志级别(可改为 INFO/DEBUG/WARN/ERROR)
pro.spss.agent: DEBUG pro.spss.server.agent: DEBUG
# MyBatis 映射与SQL日志(按需开启) # MyBatis 映射与SQL日志(按需开启)
org.mybatis: INFO org.mybatis: INFO
org.springframework.web: INFO org.springframework.web: INFO
...@@ -52,9 +52,13 @@ logging: ...@@ -52,9 +52,13 @@ logging:
file: file:
path: /opt/deploy/idap_server/logs/smart-calls-deepseek path: /opt/deploy/idap_server/logs/smart-calls-deepseek
#path:
# csv-file: /shared/deploy/data/files/data/
# analysis-result: /shared/deploy/data/files/data/
path: path:
csv-file: /opt/deploy/data/files/data/ csv-file: D:\files\
analysis-result: /opt/deploy/data/files/data/ analysis-result: D:\files\
agent: agent:
api: api:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment