jack 4 months ago
parent
commit
51d5a3f3bf
1 changed files with 6 additions and 11 deletions
  1. 6 11
      app/core/tools/file_search_tool.py

+ 6 - 11
app/core/tools/file_search_tool.py

@@ -15,13 +15,13 @@ import nest_asyncio
 nest_asyncio.apply()
 
 
+# query: str = Field(
+#    ...,
+#    description="query to look up in retrieval",
+# )
 # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
 # query: str = Field(..., description="query to look up in retrieval")
 class FileSearchToolInput(BaseModel):
-    # query: str = Field(
-    #    ...,
-    #    description="query to look up in retrieval",
-    # )
     query: str = Field(
         description="query to look up in retrieval",
     )
@@ -33,14 +33,9 @@ class FileSearchTool(BaseTool):
         "Can be used to look up knowledge base information that was uploaded to this assistant."
         "If the user is referencing about specific content within files, that is often a good hint that information may be here."
         "Singleton operation: Strictly 1 invocation per API call"
-        "## Input Requirements:" + "Natural language question (UTF-8 encoded string)"
+        "## Input Requirements:"
+        + "Directly return pure JSON parameters without including code blocks)"
     )
-    """
-    description: str = (
-        "## 工具说明:这里是用户上传的文件汇总成知识库,可以根据用户输入的问题从文件知识库中检索相关的内容。## 注意:仅允许每次调用一次。"
-    )
-
-    """
     args_schema: Type[BaseModel] = FileSearchToolInput
 
     def __init__(self) -> None: