peterpull commited on
Commit
6c2fda1
·
1 Parent(s): e3daffc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -105,10 +105,8 @@ index = get_index(INDEX_FILE)
105
  # passes the prompt to the chatbot
106
  def chatbot(input_text, mentioned_person='Mediator John Haynes', confidence_threshold=0.5):
107
  hyde= HyDEQueryTransform(include_original=True)
108
- hyde_response= index.query(input_text, query_transform=hyde)
109
- print(f"Raw hyde:{hyde_response}")
110
- prompt = f"You are {mentioned_person}. Your response to this query is {hyde_response.response}. Give this response, and ask a reflective question about the topic at hand."
111
- response = index.query(prompt, response_mode="default", verbose=True)
112
  store_message(input_text,response)
113
 
114
  # return the response
 
105
  # passes the prompt to the chatbot
106
  def chatbot(input_text, mentioned_person='Mediator John Haynes', confidence_threshold=0.5):
107
  hyde= HyDEQueryTransform(include_original=True)
108
+ prompt = f"{mentioned_person}, please respond to: {input_text}. Only reply with contextual information. If unsure, please be honest. End with a reflective question."
109
+ response = index.query(prompt, response_mode="default", verbose=True, query_transform=hyde)
 
 
110
  store_message(input_text,response)
111
 
112
  # return the response