umangchaudhry commited on
Commit
1ca5908
·
1 Parent(s): b976780

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -33,7 +33,8 @@ def respond(message, chat_history):
33
  "maximal_marginal_relevance":True,
34
  "k":10})
35
 
36
- chat_history = chat_history[1]
 
37
 
38
  # Create ChatOpenAI and ConversationalRetrievalChain
39
  model = ChatOpenAI(model='gpt-3.5-turbo')
 
33
  "maximal_marginal_relevance":True,
34
  "k":10})
35
 
36
+ if len(chat_history) == 0:
37
+ chat_history = chat_history[1]
38
 
39
  # Create ChatOpenAI and ConversationalRetrievalChain
40
  model = ChatOpenAI(model='gpt-3.5-turbo')