demo on docsgpt docs

This commit is contained in:
Alex
2023-02-28 13:11:25 +00:00
parent d651077e4e
commit b6772d8358
3 changed files with 5 additions and 1 deletions

View File

@@ -136,7 +136,11 @@ def api_answer():
# some formatting for the frontend
result['answer'] = result['result']
result['answer'] = result['answer'].replace("\\n", "<br>")
result['answer'] = result['answer'].replace("SOURCES:", "")
try:
result['answer'] = result['answer'].split("SOURCES:")[0]
except:
pass
# mock result
# result = {
# "answer": "The answer is 42",