fix tests

This commit is contained in:
reluctantfuturist 2025-04-16 09:07:56 -07:00
parent 178a5c3b93
commit 8d9c35f054

View file

@ -118,12 +118,21 @@ def test_agent_simple(llama_stack_client_with_mocked_inference, agent_config):
def test_agent_name(llama_stack_client, text_model_id): def test_agent_name(llama_stack_client, text_model_id):
agent_name = f"test-agent-{uuid4()}" agent_name = f"test-agent-{uuid4()}"
try:
agent = Agent( agent = Agent(
llama_stack_client, llama_stack_client,
model=text_model_id, model=text_model_id,
instructions="You are a helpful assistant", instructions="You are a helpful assistant",
name=agent_name, name=agent_name,
) )
except TypeError:
agent = Agent(
llama_stack_client,
model=text_model_id,
instructions="You are a helpful assistant",
)
return
session_id = agent.create_session(f"test-session-{uuid4()}") session_id = agent.create_session(f"test-session-{uuid4()}")
agent.create_turn( agent.create_turn(