File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 4242from tools import get_contact_info
4343from a2ui .core .schema .constants import VERSION_0_8 , VERSION_0_9 , A2UI_OPEN_TAG , A2UI_CLOSE_TAG
4444from a2ui .core .schema .manager import A2uiSchemaManager
45- from a2ui .core .parser .parser import parse_response , ResponsePart
45+ from a2ui .core .parser .parser import parse_response
4646from a2ui .basic_catalog .provider import BasicCatalog
4747from a2ui .a2a import (
4848 get_a2ui_agent_extension ,
49- parse_response_to_parts ,
5049 stream_response_to_parts ,
5150)
5251
@@ -358,16 +357,13 @@ async def token_stream():
358357
359358 if is_valid :
360359 logger .info (
361- "--- ContactAgent.stream: Response is valid. Sending final response"
362- f" (Attempt { attempt } ). ---"
363- )
364- final_parts = parse_response_to_parts (
365- final_response_content , fallback_text = "OK."
360+ "--- ContactAgent.stream: Response is valid. Task complete (Attempt"
361+ f" { attempt } ). ---"
366362 )
367363
368364 yield {
369365 "is_task_complete" : True ,
370- "parts" : final_parts ,
366+ "parts" : [] ,
371367 }
372368 return # We're done, exit the generator
373369
Original file line number Diff line number Diff line change 4343from tools import get_restaurants
4444from a2ui .core .schema .constants import VERSION_0_8 , VERSION_0_9 , A2UI_OPEN_TAG , A2UI_CLOSE_TAG
4545from a2ui .core .schema .manager import A2uiSchemaManager
46- from a2ui .core .parser .parser import parse_response , ResponsePart
46+ from a2ui .core .parser .parser import parse_response
4747from a2ui .basic_catalog .provider import BasicCatalog
4848from a2ui .core .schema .common_modifiers import remove_strict_validation
4949from a2ui .a2a import (
5050 get_a2ui_agent_extension ,
51- parse_response_to_parts ,
5251 stream_response_to_parts ,
5352)
5453
@@ -327,16 +326,13 @@ async def token_stream():
327326
328327 if is_valid :
329328 logger .info (
330- "--- RestaurantAgent.stream: Response is valid. Sending final response "
329+ "--- RestaurantAgent.stream: Response is valid. Task complete "
331330 f" (Attempt { attempt } ). ---"
332331 )
333- final_parts = parse_response_to_parts (
334- final_response_content , fallback_text = "OK."
335- )
336332
337333 yield {
338334 "is_task_complete" : True ,
339- "parts" : final_parts ,
335+ "parts" : [] ,
340336 }
341337 return # We're done, exit the generator
342338
You can’t perform that action at this time.
0 commit comments