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
I'm little confuse about how to return result from server to client, I saw many choices:
server can return a Message, let client get from the message.parts
server can return a task, client should get from task.artifacts.part? and in non-stream case, the client should check the task.status to decide if it need to polling the task until it complete and then get the result from final task. artifacts.part, right?
In the stream enabled case, thing is even more complex:
what client expect to get: a task or message or something else, I checked the implements of python, it have 2 more types: TaskStatusUpdateEvent and TaskArtifactUpdateEvent, the server can send back whatever it prefer no restrict.
So do we have any guide or best practice to clarified that, thanks
The text was updated successfully, but these errors were encountered:
I'm little confuse about how to return result from server to client, I saw many choices:
Message
, let client get from themessage.parts
task
, client should get fromtask.artifacts.part
? and in non-stream case, the client should check thetask.status
to decide if it need to polling the task until it complete and then get the result from finaltask. artifacts.part
, right?In the stream enabled case, thing is even more complex:
what client expect to get: a
task
ormessage
or something else, I checked the implements of python, it have 2 more types:TaskStatusUpdateEvent
andTaskArtifactUpdateEvent
, the server can send back whatever it prefer no restrict.So do we have any guide or best practice to clarified that, thanks
The text was updated successfully, but these errors were encountered: