Commit 2b741d07 authored by alex yao's avatar alex yao

feat: 修改文档理解插件提示词

parent 6cd9a666
...@@ -30,14 +30,7 @@ public class DocumentUnderstandIngFunction extends AbstractLargeModelFunction { ...@@ -30,14 +30,7 @@ public class DocumentUnderstandIngFunction extends AbstractLargeModelFunction {
private final String MODEL = "qwen-max-longcontext"; private final String MODEL = "qwen-max-longcontext";
private final String TEMPLATE = "# 工作规范:\n" + private final String TEMPLATE = "# 工作规范:\n 1.工作流程:①对提供的文档内容进行理解,支持信息检索、摘要总结、文本分析。②根据用户提出的问题,提取或者总结文档中与问题相关的内容。2.工作限制:①要将问题与文档内容精准匹配,在理解文档时要带着问题去理解 \n\n" +
"1.工作流程:\n" +
"①对提供的文档内容进行理解,支持信息检索、摘要总结、文本分析。\n" +
"②根据用户提出的问题,提取或者总结文档中与问题相关的内容。\n" +
"\n" +
"2.工作限制:\n" +
"①要将问题与文档内容精准匹配,在理解文档时要带着问题去理解\n" +
"\n" +
"## 文档内容\n" + "## 文档内容\n" +
"${document_content}\n" + "${document_content}\n" +
"## 用户问题\n" + "## 用户问题\n" +
......
...@@ -26,10 +26,10 @@ public class DocumentUnderstandingFunctionTest { ...@@ -26,10 +26,10 @@ public class DocumentUnderstandingFunctionTest {
@Test @Test
public void testDoFunction() { public void testDoFunction() {
String content = "{\"file_url\": \"https://gsst-poe-sit.gz.bcebos.com/data/20241127/1732704249980.docx\",\"question\":\"駕駛執照上的二維碼內載有什麼資料?\"}"; String content = "{\"file_url\": \"https://gsst-poe-sit.gz.bcebos.com/data/20250410/1744277235901.pdf\",\"question\":\"Can a registered Grade C electrical worker work on the electrical work of a Grade A electrical worker?\"}";
String identifier = UUID.randomUUID().toString(); String identifier = UUID.randomUUID().toString();
// String RESULT = documentUnderstandIngFunction.doFunction(content, identifier); AbstractFunctionResult<String> result = documentUnderstandIngFunction.doFunction(content, identifier);
// System.out.println(RESULT); System.out.println(result.getFunctionResult());
} }
@Test @Test
......
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