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