mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-04-19 00:06:52 +00:00
ui upgrade
This commit is contained in:
parent
cf768e9201
commit
29dc3ff5b1
1
app.py
1
app.py
@ -96,7 +96,6 @@ class Gpt4AllWebUI:
|
||||
|
||||
def condition_chatbot(self, conditionning_message = """
|
||||
Instruction: Act as GPT4All. A kind and helpful AI bot built to help users solve problems.
|
||||
Start by welcoming the user then stop sending text.
|
||||
GPT4All:Welcome! I'm here to assist you with anything you need. What can I do for you today?"""
|
||||
):
|
||||
self.full_message += conditionning_message +"\n"
|
||||
|
@ -89,8 +89,9 @@ chatForm.addEventListener('submit', event => {
|
||||
function addMessage(sender, message, id, can_edit=false) {
|
||||
console.log(id)
|
||||
const messageElement = document.createElement('div');
|
||||
messageElement.classList.add('bg-secondary', 'drop-shadow-sm', 'p-4', 'mx-6', 'my-4', 'flex', 'flex-col', 'space-x-2');
|
||||
messageElement.classList.add(sender);
|
||||
messageElement.classList.add('bg-secondary', 'drop-shadow-sm', 'p-4', 'mx-6', 'my-4', 'flex', 'flex-col', 'space-x-2', 'rounded-lg', 'shadow-lg', 'bg-gray-800', 'hover:bg-gray-700', 'transition-colors', 'duration-300');
|
||||
|
||||
//messageElement.classList.add(sender);
|
||||
messageElement.setAttribute('id', id);
|
||||
|
||||
const senderElement = document.createElement('div');
|
||||
@ -110,7 +111,9 @@ function addMessage(sender, message, id, can_edit=false) {
|
||||
if(can_edit)
|
||||
{
|
||||
const editButton = document.createElement('button');
|
||||
editButton.classList.add('bg-blue-500', 'hover:bg-blue-700', 'text-white', 'font-bold', 'py-2', 'px-4', 'rounded', 'my-2');
|
||||
editButton.classList.add('my-1','mx-1','outline-none','px-4','bg-accent','text-black','rounded-md','hover:bg-[#7ba0ea]','active:bg-[#3d73e1]','transition-colors','ease-in-out');
|
||||
editButton.style.float = 'right'; // set the float property to right
|
||||
editButton.style.display='inline-block'
|
||||
editButton.innerHTML = 'Edit';
|
||||
editButton.addEventListener('click', () => {
|
||||
const inputField = document.createElement('input');
|
||||
@ -140,7 +143,7 @@ function addMessage(sender, message, id, can_edit=false) {
|
||||
.catch(error => {
|
||||
console.error('There was a problem updating the message:', error);
|
||||
});
|
||||
editButton.style.display="block"
|
||||
editButton.style.display='inline-block'
|
||||
messageElement.replaceChild(messageTextElement, inputField);
|
||||
//messageElement.removeChild(inputField);
|
||||
messageElement.removeChild(saveButton);
|
||||
|
@ -38,6 +38,7 @@
|
||||
<div class="mb-4">
|
||||
<label class="block text-gray-700 font-bold mb-2" for="temp">Temperature</label>
|
||||
<input class="bg-gray-700 slider absolute top-0 w-full h-full opacity-0" id="temp" type="range" min="0" max="1" step="0.1" value="0.1" name="temp">
|
||||
<p id="slider-value">0.1</p>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label class="block text-gray-700 font-bold mb-2" for="n-predict">N Predict</label>
|
||||
|
Loading…
x
Reference in New Issue
Block a user