Sébastien De Greef commited on
Commit
40802c2
·
1 Parent(s): e7a2ae9

Fix typo in main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -11,11 +11,11 @@ def predict(message, history):
11
  history_langchain_format.append(AIMessage(content=ai))
12
  history_langchain_format.append(HumanMessage(content=message))
13
  try:
14
- caht_response = llm.invoke(history_langchain_format)
15
- except Exception as e:
16
- caht_response = "Error: " + str(e)
17
 
18
- return caht_response
19
 
20
  def run():
21
  demo = gr.ChatInterface(predict)
 
11
  history_langchain_format.append(AIMessage(content=ai))
12
  history_langchain_format.append(HumanMessage(content=message))
13
  try:
14
+ chat_response = llm.invoke(history_langchain_format)
15
+ except chat_response as e:
16
+ chat_response = "Error: " + str(e)
17
 
18
+ return chat_response
19
 
20
  def run():
21
  demo = gr.ChatInterface(predict)