Skip to content

Commit cf89d1e

Browse files
committed
save
1 parent 4063ad6 commit cf89d1e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/backend/approaches/chatreadretrieveread.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ def run(self, history: Sequence[dict[str, str]], overrides: dict[str, Any]) -> A
105105

106106
chat_content = chat_completion.choices[0].message.content
107107

108-
return {"data_points": results, "answer": chat_content, "thoughts": f"Searched for:<br>{q}<br><br>Prompt:<br>" + prompt.replace('\n', '<br>')}
108+
msg_to_display = ''
109+
for msg in messages:
110+
msg_to_display += str(msg) + '\n\n'
111+
112+
return {"data_points": results, "answer": chat_content, "thoughts": f"Searched for:<br>{q}<br><br>Conversations:<br>" + msg_to_display.replace('\n', '<br>')}
109113

110114
def get_chat_history_as_text(self, history: Sequence[dict[str, str]], include_last_turn: bool=True, approx_max_tokens: int=1000) -> str:
111115
history_text = ""

0 commit comments

Comments
 (0)