|
@@ -138,24 +138,6 @@ class FileSearchTool(BaseTool):
|
|
|
if (self.__keys and len(self.__keys) > 0) or (
|
|
|
self.__dirkeys and len(self.__dirkeys) > 0
|
|
|
):
|
|
|
- return (
|
|
|
- "## 工具使用规范"
|
|
|
- + "可调用工具:"
|
|
|
- + "- file_search:根据关键词或短语检索指定文件中的内容,返回匹配的文本片段的内容"
|
|
|
- + "**调用规则**:"
|
|
|
- + "1. 当问题涉及以下情况时必须调用本工具:"
|
|
|
- + " - 询问文件/文档中的具体内容"
|
|
|
- + " - 需要查找数据、条款或技术细节"
|
|
|
- + ' - 用户明确要求"查文件"或"搜索资料"'
|
|
|
- + "2. 调用时需遵循:"
|
|
|
- + " ```json"
|
|
|
- + " {"
|
|
|
- + ' "action": "file_search",'
|
|
|
- + ' "action_input": {'
|
|
|
- + ' "query": "精炼后的要搜索的关键词或短语,支持精确匹配"'
|
|
|
- + " }"
|
|
|
- + " }"
|
|
|
- )
|
|
|
+ return '## important:You can use the "retrieval" tool to search for relevant information.\n If you are asking about the content of the files, please specify any keywords, topics, or context you are looking for to help retrieve the most relevant content.'
|
|
|
else:
|
|
|
return ""
|
|
|
- # return '## important:You can use the "retrieval" tool to search for relevant information.\n If you are asking about the content of the files, please specify any keywords, topics, or context you are looking for to help retrieve the most relevant content.'
|