Skip to content

Commit 6880623

Browse files
authored
Merge pull request #411 from Azure-Samples/srbalakr/ux-msg-711
[UX] Update 'thought process' to include conversations
2 parents 4063ad6 + 91f34f1 commit 6880623

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/backend/approaches/chatreadretrieveread.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ 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 = '\n\n'.join([str(message) for message in messages])
109+
110+
return {"data_points": results, "answer": chat_content, "thoughts": f"Searched for:<br>{q}<br><br>Conversations:<br>" + msg_to_display.replace('\n', '<br>')}
109111

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

0 commit comments

Comments
 (0)