OpenData-Bordeaux-RSE / htmlTemplates.py
Ilyas KHIAT
implementation rag v0.0
fb86b93
raw
history blame
7.8 kB
css = '''
<style>
.chat-message {
padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1rem; display: flex
}
.chat-message.user {
background-color: #2b313e
}
.chat-message.bot {
background-color: #475063
}
.chat-message .avatar {
width: 20%;
}
.chat-message .avatar img {
max-width: 78px;
max-height: 78px;
border-radius: 50%;
object-fit: cover;
}
.chat-message .message {
width: 80%;
padding: 0 1.5rem;
color: #fff;
}
'''
bot_template = '''
<div class="chat-message bot">
<div class="avatar">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANoAAADoCAMAAAC+cQpPAAAAjVBMVEX///8eHh4AAAAbGxsZGRkXFxcTExMODg4NDQ0ICAgGBgYUFBT8/PzW1tbNzc309PTs7Ozl5eW/v7/f39+4uLgpKSmfn5+srKyEhISOjo7CwsLp6emVlZVjY2M0NDR4eHhTU1NCQkIvLy+vr69iYmJsbGw7OztERERLS0udnZ19fX1RUVGRkZFaWloxMTEL9S8yAAAS8UlEQVR4nNVd6WKiMBAuCYIHhwd41YqtotbWvv/jLVirmUkgB4fu92+3KhkymXsmLy/V8Bpsv5Ovj9iyrPjnK1lMlxOv4k8+A4ZREhNCuo5NrRzUdrrZv8nhFI0evbYqCGfvhLi/NCF0MgKdJBo+eolmGM0J6YjI+gN1s91b+Y9epzZGKekK9wvtHiHr6eujF6sDb0FcOV2/sAnZbP8buRLERJWwCwbEnf8fUuVEFFgRgnbJZvnodUsRvutt2X3r1tGj116OSc8xoszKT521ffTySxDoMyMDSuLZoykoQjXKLsTZz8mWvpAy6hAGvUE59ZTsg0fTwWMkoCyTfYPddOmPwvwDfjBbbKyMvjI7pUN2z2aBhTG3YEqcE78Hr8vFhpRZKy5ZPWD9JfjCFkguFYrsjHB5skuoIx/PxJULrM9cMi3/hj+3SJGqsEnyNNZXgCkju1D+reUbKRKqvc6T2CdeB66QyrbsD+HKKnB+6JNs3KmP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hcpvzvDWT2rCIunYhwmMYzWPCdPoUo5PZmnGyNLWOQBFgM0JEgDCYpnnNMek5grvT/uqMD6eoSkAMzt+p56YqRXiT5WyRvlOucqln7dNFVPXUgxZZ2n9IdCZ8HQXBchxF2220DPzRsJZVwA7aupsSHgo4gK5W87FJbKlU3MG+5idMZwqxXBNbVqQCCy5rayRpFlcfl6zLhCcq/DCb/d8uws/4z3nvlKw3tGDlZOuX3WkjSAm7G2Rd4OYMUZFV5bt3G8ZkbhE82VV8P5TvQDO82/p9cJoYrgVxaZfMBRN1oH1D3eeXIaJ6AKtHToAttzH+1LOz4wV4P678RuL5b43va7CwuY9o3234GETiMAvN681p7k7wrnyHmyX0pJjEhRc2iq83FA0Ue1akhUkuIeq5ULglbHXCts9an1mA4Zfyxv1nlL3knX2FV2WxUJ2I81QY7hTSQE7/fzpndyx/Cio57sx4+H9kI8LMKts5t90wT92Y7YvOnEvS/3bLrgh2gnhmh5D04XVhNSDc7vqEuNdMKs3Dl8fp/75jN3jBbH7e55TFh2S1NPFg/gEmGvrUsjh/pwAAAABJRU5ErkJggg==" style="max-height: 78px; max-width: 78px; border-radius: 50%; object-fit: cover;">
</div>
<div class="message">{{MSG}}</div>
</div>
'''
user_template = '''
<div class="chat-message user">
<div class="avatar">
<img src="https://media.licdn.com/dms/image/C4E03AQGvvkYN1sbUbA/profile-displayphoto-shrink_400_400/0/1588147295529?e=1714003200&v=beta&t=pAlX20zTPhqbi7ipYCkj_oUOhOgtvsy5TuJFikbH-f4">
</div>
<div class="message">{{MSG}}</div>
</div>
'''