fix: sync files loading on event loop (#3327)

This commit is contained in:
cthomas
2025-07-15 00:44:22 -07:00
committed by GitHub
parent 331e1e1d56
commit aee9cacaa3

View File

@@ -314,7 +314,7 @@ class Agent(SqlalchemyBase, OrganizationMixin, AsyncAttrs):
state["sources"] = [s.to_pydantic() for s in sources]
state["memory"] = Memory(
blocks=[m.to_pydantic() for m in memory],
file_blocks=[block for b in self.file_agents if (block := b.to_pydantic_block()) is not None],
file_blocks=[block for b in file_agents if (block := b.to_pydantic_block()) is not None],
prompt_template=get_prompt_template_for_agent_type(self.agent_type),
)
state["identity_ids"] = [i.id for i in identities]