I couldn't add a real real streaming xd this method would work perfectly with bare openai api (I used starlette for frontend backend real time communication) but it is difficult to access data with langchain and this is due to the fact that I can not retreive single characters from the chain.run even tho the streaming in chain parameters is enabled and it works correctly but only consoled in the backend. However even tho is not 100% sent at real time from the backend to the front, I noticed that the displaying is faster since gpt communicates in sync with our server and the answer is sent immediately as soon as is finished to the front with server sent events
I couldn't add a real real streaming xd this method would work perfectly with bare openai api (I used starlette for frontend backend real time communication) but it is difficult to access data with langchain and this is due to the fact that I can not retreive single characters from the chain.run even tho the streaming in chain parameters is enabled and it works correctly but only consoled in the backend. However even tho is not 100% sent at real time from the backend to the front, I noticed that the displaying is faster since gpt communicates in sync with our server and the answer is sent immediately as soon as is finished to the front with server sent events