StreamResponse

The stream response for a message. The stream should be one of the following sequences: If the response is a message, the stream should contain one, and only one, message and then close If the response is a task lifecycle, the first response should be a Task object followed by zero or more TaskStatusUpdateEvents and TaskArtifactUpdateEvents. The stream should complete when the Task if in an interrupted or terminal state. A stream that ends before these conditions are met are

JSON representation
 { 
 // Union field payload 
can be only one of the following: 
 "task" 
 : 
 { 
 object (  Task 
 
) 
 } 
 , 
 "message" 
 : 
 { 
 object (  Message 
 
) 
 } 
 , 
 "statusUpdate" 
 : 
 { 
 object (  TaskStatusUpdateEvent 
 
) 
 } 
 , 
 "artifactUpdate" 
 : 
 { 
 object (  TaskArtifactUpdateEvent 
 
) 
 } 
 // End of list of possible types for union field payload 
. 
 } 
Fields

Union field payload .

payload can be only one of the following:

task

object ( Task )

message

object ( Message )

statusUpdate
artifactUpdate

TaskStatusUpdateEvent

TaskStatusUpdateEvent is a delta even on a task indicating that a task has changed.

JSON representation
 { 
 "taskId" 
 : 
 string 
 , 
 "contextId" 
 : 
 string 
 , 
 "status" 
 : 
 { 
 object (  TaskStatus 
 
) 
 } 
 , 
 "final" 
 : 
 boolean 
 , 
 "metadata" 
 : 
 { 
 object 
 } 
 } 
Fields
taskId

string

The ID of the task that is changed

contextId

string

The ID of the context that the task belongs to

status

object ( TaskStatus )

The new status of the task.

final

boolean

Whether this is the last status update expected for this task.

TaskArtifactUpdateEvent

TaskArtifactUpdateEvent represents a task delta where an artifact has been generated.

JSON representation
 { 
 "taskId" 
 : 
 string 
 , 
 "contextId" 
 : 
 string 
 , 
 "artifact" 
 : 
 { 
 object (  Artifact 
 
) 
 } 
 , 
 "append" 
 : 
 boolean 
 , 
 "lastChunk" 
 : 
 boolean 
 , 
 "metadata" 
 : 
 { 
 object 
 } 
 } 
Fields
taskId

string

The ID of the task for this artifact

contextId

string

The ID of the context that this task belongs too

artifact

object ( Artifact )

The artifact itself

append

boolean

Whether this should be appended to a prior one produced

lastChunk

boolean

Whether this represents the last part of an artifact

Design a Mobile Site
View Site in Mobile | Classic
Share by: