You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feat]: Send Streaming Message returns Task or Message as an initial response #965
Currently this is not enforced:
While modifying hello_world client sample to expect Task or Message object as an initial response
async def _handle_stream(
stream: Any, current_task_id: str | None
) -> str | None:
async for event in stream:
print(event)
if event.HasField('message'):
print(f'Message: {get_message_text(event.message, delimiter=" ")}')
continue
if not current_task_id:
if not event.HasField('task'):
raise RuntimeError(
'Expected first streaming event to be a Task or Message, '
)
current_task_id = event.task.id
print(f'Task created with id: {current_task_id}')
if not current_task_id:
current_task_id = event.task.id
it returned an error: Expected first streaming event to be a Task or Message.
Describe the solution you'd like
Enforce first streaming event to be Task or Message object by modifying on_message_send_stream method in DefaultRequestHandlerV2. It should check if the current event is the first event and construct a new_task if it is not neither Task nor Message.
changed the title [-][Feat]: Send Streaming Message returns `Task` or Message` as an initial response[/-][+][Feat]: Send Streaming Message returns `Task` or `Message` as an initial response[/+]on Apr 13, 2026
Activity
[-][Feat]: Send Streaming Message returns `Task` or Message` as an initial response[/-][+][Feat]: Send Streaming Message returns `Task` or `Message` as an initial response[/+]fix(samples): emit `Task(TASK_STATE_SUBMITTED)` as first streaming ev…
ishymko commentedon Apr 20, 2026
Fixed by #979.