diff --git a/letta/functions/function_sets/builtin.py b/letta/functions/function_sets/builtin.py index a7ff8fb3..481e8448 100644 --- a/letta/functions/function_sets/builtin.py +++ b/letta/functions/function_sets/builtin.py @@ -17,11 +17,7 @@ def run_code(code: str, language: Literal["python", "js", "ts", "r", "java"]) -> raise NotImplementedError("This is only available on the latest agent architecture. Please contact the Letta team.") -async def web_search( - tasks: List[SearchTask], - limit: int = 3, - return_raw: bool = False, -) -> str: +async def web_search(tasks: List[SearchTask], limit: int = 1, return_raw: bool = True) -> str: """ Search the web with a list of query/question pairs and extract passages that answer the corresponding questions. @@ -39,9 +35,9 @@ async def web_search( Args: tasks (List[SearchTask]): A list of search tasks, each containing a `query` and a corresponding `question`. - limit (int, optional): Maximum number of URLs to fetch and analyse per task (must be > 0). Defaults to 3. + limit (int, optional): Maximum number of URLs to fetch and analyse per task (must be > 0). Defaults to 1. return_raw (bool, optional): If set to True, returns the raw content of the web pages. - This should be False unless otherwise specified by the user. Defaults to False. + This should be True unless otherwise specified by the user. Defaults to True. Returns: str: A JSON-encoded string containing a list of search results. diff --git a/letta/services/tool_executor/builtin_tool_executor.py b/letta/services/tool_executor/builtin_tool_executor.py index e7415cac..545bb29f 100644 --- a/letta/services/tool_executor/builtin_tool_executor.py +++ b/letta/services/tool_executor/builtin_tool_executor.py @@ -104,13 +104,7 @@ class LettaBuiltinToolExecutor(ToolExecutor): return out @trace_method - async def web_search( - self, - agent_state: "AgentState", - tasks: List[SearchTask], - limit: int = 3, - return_raw: bool = False, - ) -> str: + async def web_search(self, agent_state: "AgentState", tasks: List[SearchTask], limit: int = 1, return_raw: bool = True) -> str: """ Search the web with a list of query/question pairs and extract passages that answer the corresponding questions.