Hi,
Is it possible to add an event (just like OnStartCallBack and OnEndCallBack) that is triggered each time data is received from OpenAI.
Why?
We are telling OpenAI in the System Prompt to return all response in MarkDown format. This response will then be transformed into HTML, PDF or any output desired. By getting the response in an event we can then run it through our Markdown Parser and render it inside a Div (or something else if desired). The look and full this results this into is much more alike of the default OpenAI behavior where you see text being transformed in real-time and with backtracks (result already received). All in all this solution will give us much more control on the output.