Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 109 |
-
|
| 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
|