Amenokal-Labs / legal-ai-assistant

https://legal-ai-assistant.vercel.app
0 stars 1 forks source link

add streaming output #54

Open romaissaMe opened 1 year ago

romaissaMe commented 1 year ago

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

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
legal-ai-assistant ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 27, 2023 10:57am