Skip to content

[Question]: The best practice of return result from server side #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vincent-pli opened this issue May 23, 2025 · 0 comments
Open

[Question]: The best practice of return result from server side #640

vincent-pli opened this issue May 23, 2025 · 0 comments

Comments

@vincent-pli
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant