1414
1515from llama_stack_client import APIConnectionError
1616from llama_stack_client .types import UserMessage # type: ignore
17- from llama_stack_client .types .agents .turn import Turn
17+ from llama_stack_client .types .alpha . agents .turn import Turn
1818from llama_stack_client .types .shared .interleaved_content_item import TextContentItem
19- from llama_stack_client .types .tool_execution_step import ToolExecutionStep
20- from llama_stack_client .types .tool_response import ToolResponse
19+ from llama_stack_client .types .alpha . tool_execution_step import ToolExecutionStep
20+ from llama_stack_client .types .alpha . tool_response import ToolResponse
2121from pydantic import AnyUrl
2222
2323from tests .unit .conftest import AgentFixtures
@@ -1929,9 +1929,9 @@ async def test_get_topic_summary_successful_response(mocker: MockerFixture) -> N
19291929 # Mock the agent's create_turn method
19301930 mock_agent .create_turn .return_value = mock_response
19311931
1932- # Mock the interleaved_content_as_str function
1932+ # Mock the content_to_str function
19331933 mocker .patch (
1934- "app.endpoints.query.interleaved_content_as_str " ,
1934+ "app.endpoints.query.content_to_str " ,
19351935 return_value = "This is a topic summary about OpenStack" ,
19361936 )
19371937
@@ -2062,9 +2062,9 @@ async def test_get_topic_summary_with_interleaved_content(
20622062 # Mock the agent's create_turn method
20632063 mock_agent .create_turn .return_value = mock_response
20642064
2065- # Mock the interleaved_content_as_str function
2066- mock_interleaved_content_as_str = mocker .patch (
2067- "app.endpoints.query.interleaved_content_as_str " , return_value = "Topic summary"
2065+ # Mock the content_to_str function
2066+ mock_content_to_str = mocker .patch (
2067+ "app.endpoints.query.content_to_str " , return_value = "Topic summary"
20682068 )
20692069
20702070 # Mock the get_topic_summary_system_prompt function
@@ -2085,8 +2085,8 @@ async def test_get_topic_summary_with_interleaved_content(
20852085 # Assertions
20862086 assert result == "Topic summary"
20872087
2088- # Verify interleaved_content_as_str was called with the content
2089- mock_interleaved_content_as_str .assert_called_once_with (mock_content )
2088+ # Verify content_to_str was called with the content
2089+ mock_content_to_str .assert_called_once_with (mock_content )
20902090
20912091
20922092@pytest .mark .asyncio
@@ -2107,10 +2107,8 @@ async def test_get_topic_summary_system_prompt_retrieval(mocker: MockerFixture)
21072107 # Mock the agent's create_turn method
21082108 mock_agent .create_turn .return_value = mock_response
21092109
2110- # Mock the interleaved_content_as_str function
2111- mocker .patch (
2112- "app.endpoints.query.interleaved_content_as_str" , return_value = "Topic summary"
2113- )
2110+ # Mock the content_to_str function
2111+ mocker .patch ("app.endpoints.query.content_to_str" , return_value = "Topic summary" )
21142112
21152113 # Mock the get_topic_summary_system_prompt function
21162114 mock_get_topic_summary_system_prompt = mocker .patch (
@@ -2183,10 +2181,8 @@ async def test_get_topic_summary_agent_creation_parameters(
21832181 # Mock the agent's create_turn method
21842182 mock_agent .create_turn .return_value = mock_response
21852183
2186- # Mock the interleaved_content_as_str function
2187- mocker .patch (
2188- "app.endpoints.query.interleaved_content_as_str" , return_value = "Topic summary"
2189- )
2184+ # Mock the content_to_str function
2185+ mocker .patch ("app.endpoints.query.content_to_str" , return_value = "Topic summary" )
21902186
21912187 # Mock the get_topic_summary_system_prompt function
21922188 mocker .patch (
@@ -2230,10 +2226,8 @@ async def test_get_topic_summary_create_turn_parameters(mocker: MockerFixture) -
22302226 # Mock the agent's create_turn method
22312227 mock_agent .create_turn .return_value = mock_response
22322228
2233- # Mock the interleaved_content_as_str function
2234- mocker .patch (
2235- "app.endpoints.query.interleaved_content_as_str" , return_value = "Topic summary"
2236- )
2229+ # Mock the content_to_str function
2230+ mocker .patch ("app.endpoints.query.content_to_str" , return_value = "Topic summary" )
22372231
22382232 # Mock the get_topic_summary_system_prompt function
22392233 mocker .patch (
0 commit comments