peterpull commited on
Commit
29de862
·
1 Parent(s): 0dbffbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -67,7 +67,7 @@ def get_index(index_file_path):
67
  def chatbot(input_text, mentioned_person='Mediator John Haynes', confidence_threshold=0.5):
68
  index = get_index(INDEX_FILE)
69
  prompt = f"You are {mentioned_person}: {input_text}\n\n At the end of your answer ask a provocative question."
70
- response = index.query(prompt, response_mode="complete")[0]
71
 
72
  # Check the confidence score of the response
73
  if response.score < confidence_threshold:
 
67
  def chatbot(input_text, mentioned_person='Mediator John Haynes', confidence_threshold=0.5):
68
  index = get_index(INDEX_FILE)
69
  prompt = f"You are {mentioned_person}: {input_text}\n\n At the end of your answer ask a provocative question."
70
+ response = index.query(prompt, response_mode="compact")[0]
71
 
72
  # Check the confidence score of the response
73
  if response.score < confidence_threshold: