devchavda11 commited on
Commit
c4a55a3
·
verified ·
1 Parent(s): a3e0cb3

Update src/chat_langraph.py

Browse files
Files changed (1) hide show
  1. src/chat_langraph.py +4 -2
src/chat_langraph.py CHANGED
@@ -218,8 +218,10 @@ def input_node(state: chatstate):
218
 
219
 
220
  def llmresponse(state: chatstate):
221
- response = llm.invoke(state["messages"])
222
- return {"messages": [response]}
 
 
223
 
224
 
225
  def checktool(state: chatstate):
 
218
 
219
 
220
  def llmresponse(state: chatstate):
221
+ response = llm.stream(state["messages"])
222
+ for chunk in response:
223
+
224
+ yield {"messages": [chunk]};
225
 
226
 
227
  def checktool(state: chatstate):