refac: think tag

This commit is contained in:
Timothy Jaeryang Baek
2025-01-22 09:24:40 -08:00
parent cf470e70e2
commit 9feed97f22
4 changed files with 42 additions and 30 deletions

View File

@@ -1166,7 +1166,7 @@ async def process_chat_response(
)
# Format reasoning with <details> tag
content = f"{ongoing_content}<details>\n<summary>Thought for {reasoning_duration} seconds</summary>\n{reasoning_display_content}\n</details>\n"
content = f'{ongoing_content}<details type="reasoning" done="true">\n<summary>Thought for {reasoning_duration} seconds</summary>\n{reasoning_display_content}\n</details>\n'
else:
content = ""
@@ -1183,7 +1183,7 @@ async def process_chat_response(
)
# Show ongoing thought process
content = f"{ongoing_content}<details>\n<summary>Thinking… <loading/></summary>\n{reasoning_display_content}\n</details>\n"
content = f'{ongoing_content}<details type="reasoning" done="false">\n<summary>Thinking…</summary>\n{reasoning_display_content}\n</details>\n'
if ENABLE_REALTIME_CHAT_SAVE:
# Save message in the database