peterpull commited on
Commit
232bf6d
·
1 Parent(s): e5fb371

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -66,14 +66,13 @@ def get_index(index_file_path):
66
  # passes the prompt to the chatbot
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}. Answer this: {input_text}. Only reply from the contextual data, or say you don't know. At the end of your answer ask a provocative question."
70
  response = index.query(prompt, response_mode="compact")
71
 
72
- store_message(input_text, response_text)
73
- print(f"Chat input: {input_text}\nChatbot response: {response_text}")
74
 
75
  # return the response
76
- return response_text
77
 
78
 
79
 
 
66
  # passes the prompt to the chatbot
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}. Answer this: {input_text}. Only reply from the contextual data, or say you don't know. At the end of your answer ask an insightful question."
70
  response = index.query(prompt, response_mode="compact")
71
 
72
+ store_message(input_text,response)
 
73
 
74
  # return the response
75
+ return response.response
76
 
77
 
78