i have fastapi like this
@r.get("/chat", tags=["basic"])
async def get_prompt(request: RmsGptRequest = Depends()):
logger.info(f"Getting results with params: {request}")
# Stream the response
handler = tara.run(query=request.prompt,user_email=request.user_email)
return EventSourceResponse(handler.stream_events())
how can i return the stream data as json directly from workflow ?? because I'm getting the data like this in Postman
data: data=' R' source='internal'
Add a reply
Sign up and join the conversation on Discord