Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,9 +106,8 @@ index = get_index(INDEX_FILE)
|
|
| 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"{hyde_response}")
|
| 110 |
-
|
| 111 |
-
prompt = f"You are {mentioned_person}. Answer this query: {input_text}. Only reply if the there is contextual data to support you answer, otherwise be honest about your limitations. To finish, ask a reflective question about the topic at hand."
|
| 112 |
response = index.query(prompt, response_mode="default", verbose=True)
|
| 113 |
store_message(input_text,response)
|
| 114 |
|
|
|
|
| 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 |
|