Skip to content

Commit

Permalink
Only apply newline once before all role titles are added
Browse files Browse the repository at this point in the history
  • Loading branch information
LobaDK committed Aug 23, 2024
1 parent 58d47a2 commit d5c43e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cogs/Chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,8 @@ async def initiatechatview(
messages = []
messages.append("Chat history for this server:")
for message in conversation_history:
messages.append(
f"\n**{message['role'].title()}**: {message['content']}"
)
messages.append("\n")
messages.append(f"**{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 d5c43e7

Please sign in to comment.