Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: Make exa get_contents async [LET-4574] (#5068)
Matthew Zhou29515e9a7da3
diff --git a/letta/services/tool_executor/builtin_tool_executor.py b/letta/services/tool_executor/builtin_tool_executor.pyindex a0d35030b..cf7e38813 100644--- a/letta/services/tool_executor/builtin_tool_executor.py+++ b/letta/services/tool_executor/builtin_tool_executor.py@@ -219,10 +219,12 @@ class LettaBuiltinToolExecutor(ToolExecutor):logger.info(f"[DEBUG] Starting Exa fetch content for url: '{url}'")exa = Exa(api_key=exa_api_key)- results = exa.get_contents(- [url],- text=True,- ).results+ results = await asyncio.to_thread(+ lambda: exa.get_contents(+ [url],+ text=True,+ ).results+ )if len(results) > 0:result = results[0]