Chia Woon Yap commited on
Commit
8b326b1
·
verified ·
1 Parent(s): eff611e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -181,7 +181,8 @@ def chat_with_groq(user_input, chat_history):
181
  prompt = f"{system_prompt}\n\nConversation History:\n{conversation_history}\n\nUser Input: {user_input}\n\nContext:\n{context}"
182
 
183
  # Call the chat model
184
- response = chat_model([HumanMessage(content=prompt)])
 
185
 
186
  # Clean response to remove any unwanted formatting
187
  cleaned_response_text = clean_response(response.content)
 
181
  prompt = f"{system_prompt}\n\nConversation History:\n{conversation_history}\n\nUser Input: {user_input}\n\nContext:\n{context}"
182
 
183
  # Call the chat model
184
+ #response = chat_model([HumanMessage(content=prompt)])
185
+ response = chat_model.invoke([HumanMessage(content=prompt)]) # Call the chat model using invoke method
186
 
187
  # Clean response to remove any unwanted formatting
188
  cleaned_response_text = clean_response(response.content)