@@ -656,7 +656,7 @@ def tag_to_message_content(
656656 "A Tag was included in a UserMessageItem but Converter.tag_to_message_content is not implemented"
657657 )
658658
659- def hidden_context_to_input (
659+ async def hidden_context_to_input (
660660 self , item : HiddenContextItem
661661 ) -> TResponseInputItem | list [TResponseInputItem ] | None :
662662 """
@@ -667,7 +667,7 @@ def hidden_context_to_input(
667667 "HiddenContextItem were present in a user message but Converter.hidden_context_to_input was not implemented"
668668 )
669669
670- def task_to_input (
670+ async def task_to_input (
671671 self , item : TaskItem
672672 ) -> TResponseInputItem | list [TResponseInputItem ] | None :
673673 """
@@ -692,7 +692,7 @@ def task_to_input(
692692 role = "user" ,
693693 )
694694
695- def workflow_to_input (
695+ async def workflow_to_input (
696696 self , item : WorkflowItem
697697 ) -> TResponseInputItem | list [TResponseInputItem ] | None :
698698 """
@@ -722,7 +722,7 @@ def workflow_to_input(
722722 )
723723 return messages
724724
725- def widget_to_input (
725+ async def widget_to_input (
726726 self , item : WidgetItem
727727 ) -> TResponseInputItem | list [TResponseInputItem ] | None :
728728 """
@@ -892,16 +892,16 @@ async def _thread_item_to_input_item(
892892 out = await self .end_of_turn_to_input (item ) or []
893893 return out if isinstance (out , list ) else [out ]
894894 case WidgetItem ():
895- out = self .widget_to_input (item ) or []
895+ out = await self .widget_to_input (item ) or []
896896 return out if isinstance (out , list ) else [out ]
897897 case WorkflowItem ():
898- out = self .workflow_to_input (item ) or []
898+ out = await self .workflow_to_input (item ) or []
899899 return out if isinstance (out , list ) else [out ]
900900 case TaskItem ():
901- out = self .task_to_input (item ) or []
901+ out = await self .task_to_input (item ) or []
902902 return out if isinstance (out , list ) else [out ]
903903 case HiddenContextItem ():
904- out = self .hidden_context_to_input (item ) or []
904+ out = await self .hidden_context_to_input (item ) or []
905905 return out if isinstance (out , list ) else [out ]
906906 case _:
907907 assert_never (item )
0 commit comments