jack 3 週間 前
コミット
1d33b036d5
2 ファイル変更5 行追加1 行削除
  1. 1 0
      app/core/runner/thread_runner.py
  2. 4 1
      app/core/tools/file_search_tool.py

+ 1 - 0
app/core/runner/thread_runner.py

@@ -331,6 +331,7 @@ class ThreadRunner:
             try:
                 if token_id is not None and len(token_id) > 0:
                     token = TokenService.get_token_by_id(self.session, token_id)
+                    print(token)
                     return LLMBackend(
                         base_url=token.llm_base_url, api_key=token.llm_api_key
                     )

+ 4 - 1
app/core/tools/file_search_tool.py

@@ -151,7 +151,10 @@ class FileSearchTool(BaseTool):
         if (self.__keys and len(self.__keys) > 0) or (
             self.__dirkeys and len(self.__dirkeys) > 0
         ):
-            return ""  # "## 能力限制:每次请求将会限制为最多使用三种工具,并且每种工具每次只能使用一次。这样可以保证每次操作都更加简洁和有效。"  # "## Top Important: Please use the 'file_search' tool to search for relevant content or keywords. Summarize the content or keywords and provide them for 'file_search' tool usage. Please ensure that the 'file_search' tool is used only once per request."
+            return (
+                'You can use the "retrieval" tool to access relevant context . '
+                + "Please keep your queries concise for the best results."
+            )  # "## 能力限制:每次请求将会限制为最多使用三种工具,并且每种工具每次只能使用一次。这样可以保证每次操作都更加简洁和有效。"  # "## Top Important: Please use the 'file_search' tool to search for relevant content or keywords. Summarize the content or keywords and provide them for 'file_search' tool usage. Please ensure that the 'file_search' tool is used only once per request."
         else:
             return ""