Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: search_files with embed_query (#2996)

Shangyin Tan0e7159d78fba
diff --git a/letta/services/tool_executor/files_tool_executor.py b/letta/services/tool_executor/files_tool_executor.py
index 6f4a67df5..add7780ee 100644
--- a/letta/services/tool_executor/files_tool_executor.py
+++ b/letta/services/tool_executor/files_tool_executor.py
@@ -417,7 +417,13 @@ class LettaFileToolExecutor(ToolExecutor):
self.logger.info(f"Semantic search started for agent {agent_state.id} with query '{query}' (limit: {limit})")
# Get semantic search results
- passages = await self.agent_manager.list_source_passages_async(actor=self.actor, agent_id=agent_state.id, query_text=query)
+ passages = await self.agent_manager.list_source_passages_async(
+ actor=self.actor,
+ agent_id=agent_state.id,
+ query_text=query,
+ embed_query=True,
+ embedding_config=agent_state.embedding_config,
+ )
if not passages:
return f"No semantic matches found for query: '{query}'"