templates/index.html aktualisiert
This commit is contained in:
@@ -324,9 +324,19 @@
|
||||
|
||||
modelSelect.innerHTML = '<option>Lade Modelle...</option>';
|
||||
|
||||
// API-Query vorbereiten
|
||||
// API-Query vorbereiten
|
||||
let apiUrl = `/api/models?provider=${provider}`;
|
||||
|
||||
if (provider === "ollama" && ollamaUrl) {
|
||||
// FIX: Prüfen, ob die URL mit /v1 endet. Wenn nicht, hängen wir es an.
|
||||
if (!ollamaUrl.endsWith('/v1') && !ollamaUrl.includes('/api')) {
|
||||
// Eventuellen Schrägstrich am Ende entfernen und /v1 anhängen
|
||||
ollamaUrl = ollamaUrl.replace(/\/$/, '') + '/v1';
|
||||
|
||||
// Das Input-Feld direkt aktualisieren, damit es beim Speichern stimmt
|
||||
document.getElementById('ollama-url').value = ollamaUrl;
|
||||
}
|
||||
apiUrl += `&base_url=${encodeURIComponent(ollamaUrl)}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user