[Feat]: RequestContext supports distinguishing between message/send and message/stream
ThinkMo opened this issue · 2 comments
Is your feature request related to a problem? Please describe.
No response
Describe the solution you'd like
In some cases, the a2a task needs to be executed in the background. When the background is executed, the underlying non-streaming seems to return faster than the streaming.
If RequestContext supports distinguishing between message/send and message/stream,llm invoke() seem faster than stream()
Describe alternatives you've considered
No response
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
@ThinkMo if I understand correctly, you'd expect the JSON-RPC method to be present in the ServerCallContext such that you can distinguish between message/stream and message/send. And that is because LLM APIs have different methods for streaming/non-streaming, like you've mentioned.
I think it makes sense, it's a valid point. It would also be helpful for me.
@holtskinner if you think it's a good idea, I can open a PR for this.
Yes, your understanding is absolutely correct.