I am trying to build a basic chat application using StreamingChatCompletion but I think I must be missing something: where can I access the response from the assistant?
As far as I can see the response is inserted into the DOM directly, it is never written to the variable associated with the widget you provide.
However, in order to have a proper chat with the assistant, you should send the conversation for context, not just your latest prompt. So I need the responses from previous prompts.
Am I missing something?
Hi Atalaia,
Long time, no see! :D
We've just uploaded a version where the response from the assistant is being sent in the OnEndCallback.
To get the answer from the assistant, you need to add a screen action that has an input parameter of type Text, something like this:
Then, you need to use a JS node before calling the StreamChatCompletion to output the callback function:
Use the output of the JS node to be the input parameter OnDoneCallback:
You'll be able to achieve something like this:
Please let me know if this works for you,
Cheers,
Bruno
Hi there, Bruno!
that worked perfectly, thanks 😊
Don't forget to update the description of the "OnDoneCallback" parameter to mention the new input required.
And while you're at it, for feature parity with the non-streaming action, you might as well add the ExtraInformation output to the callback as well 😁