Skip to content

Commit

Permalink
Make role titles from chat history appear in bold, and add a newline …
Browse files Browse the repository at this point in the history
…before each new chat to make it clearer where each starts
  • Loading branch information
LobaDK committed Aug 23, 2024
1 parent 759139e commit 58d47a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cogs/Chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ async def initiatechatview(
messages = []
messages.append("Chat history for this server:")
for message in conversation_history:
messages.append(f"{message['role'].title()}: {message['content']}")
messages.append(
f"\n**{message['role'].title()}**: {message['content']}"
)
message = "\n".join(messages)
if len(message) > 2000:
message = split_message_by_sentence(message)
Expand Down

0 comments on commit 58d47a2

Please sign in to comment.