deep-chat icon indicating copy to clipboard operation
deep-chat copied to clipboard

Access to the chat stream at stream start

Open FranzHell opened this issue 1 year ago • 2 comments

I am currently using https://deepchat.dev/docs/events/#onMessage to access the message that is received by deep-chat. However I can only access it after the stream has ended for that message. Optimally I would like to access the streaming object and use it, because I want to trigger something after the first few incoming words.

I have set stream: true and am successfully rendering the streaming input from my python backend which returns

    return Response(stream_with_context(stream_response(handler)), mimetype="text/event-stream")

Is there a way to do so? Thanks very much for your feedback!

FranzHell avatar Aug 26 '24 13:08 FranzHell