How to send one message with useChat
, but get back distinct message streams from multiple model calls?
#8438
Unanswered
tomsseisums
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking to make a workflow where user interfaces directly with one chat interface and they get responses back there. But I'd like to get a different response from the same chat session, to be presented in another UI layer.
Idea
Given the UI (CSS Grid Template notation):
Where:
main
is the chat assistant interfacedesigner
is a response from "designer"product owner
is a response from "product owner"The idea would be, that the user interfaces strictly with
main
, sending messages to there.And in the backend,
main
essentially is an orchestrator set up to decide what the query is about, and invokingdesigner
andproduct owner
as tools.designer
andproduct owner
themselves should be streamed content.Attempt
Following I've outlined my attempt, which provides an unexpected output. Most likely I'm doing something wrong.
I've excluded
product_owner
part here for brevity, as the issue comes up with just getting the one extra stream working properly.Backend
The main pipelining works, both streams get merged and all is good on that part.
Frontend
The issue seems to be in the Frontend layer.
Any attempts to differentiate the conversations, produce the same unexpected outcome of :
designer
message starting on the right Conversation column, but after some time it gets moved to themain
Conversation column on the left.Issue
So as I outlined above, the issue with this is that messages jump from
designer
back tomain
. As well as the parts get duplicated across messages.The raw response from the backend (Click to Open)
Video recording of the issue:

It seems that the parts get somehow merged.
Expectation
I'd expect that the
designer
message would not be inlined withinmain
message. And the parts also shouldn't be duplicated.How do I get my expected result?
Beta Was this translation helpful? Give feedback.
All reactions