Skip to content

Commit 2c573be

Browse files
committed
fix(agents): remove non-existent AsyncAgent.initialize() calls
The AsyncAgent class in llama-stack-client 0.3.5 does not have an initialize() method. These calls were causing AttributeError at runtime. The agent does not require explicit initialization - create_session() works without it. Signed-off-by: Major Hayden <major@redhat.com>
1 parent 2adb747 commit 2c573be

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/utils/endpoints.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ async def get_agent(
355355
tool_parser=None if no_tools else GraniteToolParser.get_parser(model_id),
356356
enable_session_persistence=True, # type: ignore[call-arg]
357357
)
358-
await agent.initialize() # type: ignore[attr-defined]
359358

360359
if existing_agent_id and conversation_id:
361360
logger.debug("Existing conversation ID: %s", conversation_id)
@@ -412,7 +411,6 @@ async def get_temp_agent(
412411
# type: ignore[call-arg] # Temporary agent doesn't need persistence
413412
# enable_session_persistence=False,
414413
)
415-
await agent.initialize() # type: ignore[attr-defined]
416414

417415
# Generate new IDs for the temporary agent
418416
# conversation_id = agent.agent_id

0 commit comments

Comments
 (0)