jack 4 月之前
父節點
當前提交
51d5a3f3bf
共有 1 個文件被更改,包括 6 次插入11 次删除
  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()
 nest_asyncio.apply()
 
 
 
 
+# query: str = Field(
+#    ...,
+#    description="query to look up in retrieval",
+# )
 # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
 # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
 # query: str = Field(..., description="query to look up in retrieval")
 # query: str = Field(..., description="query to look up in retrieval")
 class FileSearchToolInput(BaseModel):
 class FileSearchToolInput(BaseModel):
-    # query: str = Field(
-    #    ...,
-    #    description="query to look up in retrieval",
-    # )
     query: str = Field(
     query: str = Field(
         description="query to look up in retrieval",
         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."
         "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."
         "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"
         "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
     args_schema: Type[BaseModel] = FileSearchToolInput
 
 
     def __init__(self) -> None:
     def __init__(self) -> None: