Lots of fix

Can now add new api key again, and some minor bugs
This commit is contained in:
2024-08-14 17:52:30 +02:00
parent 4dca94b1ee
commit edd5c58a7b
20 changed files with 214 additions and 165 deletions
+5 -3
View File
@@ -38,6 +38,7 @@
<script>
var textareaControl = document.getElementById('textarea-control');
const textarea = document.getElementById('chat-input-textarea');
// Every 0.01s check if the text area have htmx-request class, if yes, add the class is-loading
setInterval(function () {
@@ -49,8 +50,10 @@
} else {
textareaControl.classList.remove('is-loading');
}
toggleSendButton();
}, 10);
if (document.getElementById('chat-input-textarea') != null ) {
toggleSendButton();
}
}, 100);
function updateIcons() {
if (window.innerWidth < 450) {
@@ -90,7 +93,6 @@
}
});
const textarea = document.querySelector('#chat-input-textarea');
textarea.addEventListener('keydown', handleTextareaKeydown);
document.addEventListener('htmx:afterSwap', toggleSendButton)
+1 -1
View File
@@ -44,7 +44,7 @@
</div>
{% endif %}
<div class="message-body">
<div class="content" style="overflow-x: auto; width: 100%;">{{ message.Content | safe }}</div>
<div class="content" style="overflow: hidden; width: 100%;">{{ message.Content | safe }}</div>
</div>
{% endif %}
{% endfor %}
+1 -1
View File
@@ -14,7 +14,7 @@
</div>
<div class="message-body">
<div class="content"
style="overflow-x: auto;
style="overflow: hidden;
width: 100%"
id="content-{{ ID }}">{{ Content | safe }}</div>
</div>
-13
View File
@@ -143,19 +143,6 @@
</div>
</div>
<script>
const companyTempMinMaxValues = {
'openai': { min: 0, max: 2 },
'anthropic': { min: 0, max: 1 },
'deepseek': { min: 0, max: 2 },
'fireworks': { min: 0, max: 2 },
'google': { min: 0, max: 2 },
'groq': { min: 0, max: 2 },
'mistral': { min: 0, max: 2 },
'nim': { min: 0, max: 2 },
'perplexity': { min: 0, max: 2 },
'together': { min: 0, max: 2 },
};
var sortable = new Sortable(document.getElementById('llm-list'), {
animation: 150,
onEnd: function (evt) {