wang16888 commited on
Commit
00ea599
·
verified ·
1 Parent(s): a79699d

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +5 -0
app/main.py CHANGED
@@ -86,6 +86,11 @@ async def rag_stream(request: Request, db: Session = Depends(get_db)):
86
  question=user_request.question,
87
  chat_history=format_chat_history(chat_history),
88
  )
 
 
 
 
 
89
  callback = LogResponseCallback(user_request, db)
90
  return EventSourceResponse(generate_stream(rag_input, callback))
91
 
 
86
  question=user_request.question,
87
  chat_history=format_chat_history(chat_history),
88
  )
89
+
90
+ stream = rag_chain.stream(
91
+ rag_input.dict(),
92
+ config={"callbacks": [Callback()]}
93
+ )
94
  callback = LogResponseCallback(user_request, db)
95
  return EventSourceResponse(generate_stream(rag_input, callback))
96