Replies: 2 comments
-
🤖 Hello @girithodu! 🚀 I am Dosu, a friendly bot designed to help solve bugs, answer questions, and assist you in becoming a contributor while you await a human maintainer. I'm here to help, so let's get started! Based on the information provided, it seems like the issue you're experiencing might be related to the When you're running your application locally, you might be manually setting the To fix this issue, you could ensure that the cf_ai = CloudflareWorkersAI(
account_id=my_account_id,
api_token=my_api_token,
model=llm_model,
streaming=True
) This will ensure that the responses from the Cloudflare Workers AI service are streamed, regardless of whether your application is running locally or on Azure with Kubernetes. You can find more details about this in the CloudflareWorkersAI class in the LangChain repository. As for your question about whether the LangChain framework supports streaming responses in its implementation, the answer is yes. The LangChain framework does support streaming responses in its implementation. This is evident from the Regarding your question about whether the LangChain framework has any specific configurations or settings for handling streaming when deployed on different platforms like Azure with Kubernetes, I wasn't able to find any specific information about this in the LangChain repository. However, it's possible that there might be some platform-specific configurations or settings that need to be adjusted when deploying your application on Azure with Kubernetes. If you could provide more details about your deployment configuration, I might be able to provide more specific advice. I hope this helps! If you have any more questions, feel free to ask. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
@girithodu , were you able to figure this out? I am facing the same issue here |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I'm encountering issues with streaming in my application. Streaming works smoothly in my local environment, where the backend streams one token at a time, and the frontend accepts tokens in the same manner. However, when I deploy both services on Azure with Kubernetes, streaming no longer functions correctly. I'm observing that all of the LLM answers are received at the end instead of progressively. Could someone please assist me in understanding what might be causing this issue?
yield f"data: {json.dumps({'token': token})}\n\n"
return StreamingResponse(gen, media_type="text/event-stream")
gen is function that is doing the streamingTechnologies
FastAPI for Py backend
Next.js/React for Frontend
Beta Was this translation helpful? Give feedback.
All reactions