Better temperature (Anthropic from 0 to 1)
This commit is contained in:
parent
9d76a49b18
commit
1d535f0db9
2
TODO.md
2
TODO.md
@ -18,7 +18,7 @@
|
|||||||
[X] Add Nvidia NIM
|
[X] Add Nvidia NIM
|
||||||
[ ] Add login with email and password
|
[ ] Add login with email and password
|
||||||
[ ] Add login with AppleID
|
[ ] Add login with AppleID
|
||||||
[ ] Better temperature settings. (Anthropic from 0-1, OpenAI from 0-2, DeepSeek from -2-2, ect)
|
[X] Better temperature settings. (Anthropic from 0-1, OpenAI from 0-2, DeepSeek from -2-2, ect)
|
||||||
[X] Auto update the modelsInfos db (At least remove unavailable models and send me an email when new one arrive)
|
[X] Auto update the modelsInfos db (At least remove unavailable models and send me an email when new one arrive)
|
||||||
[ ] Encrypt the API keys
|
[ ] Encrypt the API keys
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
placeholder="Model name"
|
placeholder="Model name"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
<div class="select is-fullwidth is-small mb-3" id="model-id-input">
|
<div class="select is-fullwidth is-small mb-3" id="model-id-input">
|
||||||
<select name="selectedLLMId">
|
<select name="selectedLLMId" id="modelID-select">
|
||||||
{% for modelInfo in ModelInfos %}
|
{% for modelInfo in ModelInfos %}
|
||||||
<option value="{{ modelInfo.ModelID }}">
|
<option value="{{ modelInfo.ModelID }}">
|
||||||
{{ modelInfo.Company.Name }} - {{ modelInfo.Name }}
|
{{ modelInfo.Company.Name }} - {{ modelInfo.Name }}
|
||||||
@ -100,7 +100,7 @@
|
|||||||
<input class="slider is-small mb-3"
|
<input class="slider is-small mb-3"
|
||||||
step="0.05"
|
step="0.05"
|
||||||
min="0"
|
min="0"
|
||||||
max="2"
|
max="1"
|
||||||
value="0"
|
value="0"
|
||||||
type="range"
|
type="range"
|
||||||
id="temperature-slider"
|
id="temperature-slider"
|
||||||
@ -143,6 +143,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<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'), {
|
var sortable = new Sortable(document.getElementById('llm-list'), {
|
||||||
animation: 150,
|
animation: 150,
|
||||||
onEnd: function (evt) {
|
onEnd: function (evt) {
|
||||||
@ -161,6 +174,25 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.getElementById('modelID-select').addEventListener('change', handleSelectChange)
|
||||||
|
|
||||||
|
function handleSelectChange() {
|
||||||
|
const selectElement = document.getElementById('modelID-select');
|
||||||
|
const selectedOption = selectElement.options[selectElement.selectedIndex];
|
||||||
|
const selectedText = selectedOption.innerHTML;
|
||||||
|
|
||||||
|
if (selectedText != "Custom Endpoints") {
|
||||||
|
const companyName = selectedText.split(' - ')[0].trim();
|
||||||
|
var companyMinMax = companyTempMinMaxValues[companyName];
|
||||||
|
} else {
|
||||||
|
var companyMinMax = companyTempMinMaxValues['openai'];
|
||||||
|
}
|
||||||
|
|
||||||
|
var tempSlider = document.getElementById('temperature-slider');
|
||||||
|
tempSlider.setAttribute("min", companyMinMax.min.toString());
|
||||||
|
tempSlider.setAttribute("max", companyMinMax.max.toString());
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('model-name-input').addEventListener('input', function () {
|
document.getElementById('model-name-input').addEventListener('input', function () {
|
||||||
document.getElementById('confirm-create-model-button').disabled = this.value === '' || !document.getElementById('endpoint-error').classList.contains('is-hidden');
|
document.getElementById('confirm-create-model-button').disabled = this.value === '' || !document.getElementById('endpoint-error').classList.contains('is-hidden');
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user