make username bold and on a new line
This commit is contained in:
parent
175f49d135
commit
aad5fc1adf
2 changed files with 4 additions and 4 deletions
6
app.py
6
app.py
|
|
@ -111,7 +111,7 @@ def handle_message(data):
|
|||
|
||||
emit(
|
||||
"message",
|
||||
{"id": new_message.id, "content": f"{data['username']}:\n\n{data['message']}"},
|
||||
{"id": new_message.id, "content": f"**{data['username']}:**\n\n{data['message']}"},
|
||||
room=data["room"],
|
||||
)
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ def chat_claude(username, room, message, model_name="anthropic.claude-v2"):
|
|||
"message_chunk",
|
||||
{
|
||||
"id": msg_id,
|
||||
"content": f"{username} ({model_name}): {content}",
|
||||
"content": f"**{username} ({model_name}):**\n\n{content}",
|
||||
},
|
||||
room=room,
|
||||
)
|
||||
|
|
@ -303,7 +303,7 @@ def chat_gpt(username, room, message, model_name="gpt-3.5-turbo"):
|
|||
"message_chunk",
|
||||
{
|
||||
"id": msg_id,
|
||||
"content": f"{username} ({model_name}): {content}",
|
||||
"content": f"**{username} ({model_name}):**\n\n{content}",
|
||||
},
|
||||
room=room,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ socket.on('previous_messages', (data) => {
|
|||
messageWrapper.id = "message-" + data.id;
|
||||
|
||||
const newMessage = document.createElement('p');
|
||||
newMessage.innerHTML = marked.marked(`${data.username}:\n\n${data.message}`);
|
||||
newMessage.innerHTML = marked.marked(`**${data.username}:**\n\n${data.message}`);
|
||||
|
||||
// Create the delete button
|
||||
const deleteButton = document.createElement('button');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue