mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-05 20:03:48 +00:00
update ollama modal
This commit is contained in:
@@ -598,20 +598,14 @@ export function NotificationSettings() {
|
||||
}
|
||||
|
||||
const fetchOllamaModels = useCallback(async (url: string) => {
|
||||
console.log("[v0] fetchOllamaModels called with URL:", url)
|
||||
if (!url) {
|
||||
console.log("[v0] fetchOllamaModels: URL is empty, returning")
|
||||
return
|
||||
}
|
||||
if (!url) return
|
||||
setLoadingOllamaModels(true)
|
||||
console.log("[v0] fetchOllamaModels: Starting fetch...")
|
||||
try {
|
||||
const data = await fetchApi<{ success: boolean; models: string[]; message: string }>("/api/notifications/ollama-models", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ ollama_url: url }),
|
||||
})
|
||||
console.log("[v0] fetchOllamaModels: Response:", data)
|
||||
if (data.success && data.models && data.models.length > 0) {
|
||||
setOllamaModels(data.models)
|
||||
// Auto-select first model if current selection is empty or not in the list
|
||||
@@ -1444,10 +1438,7 @@ export function NotificationSettings() {
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="h-9 px-3 shrink-0"
|
||||
onClick={() => {
|
||||
console.log("[v0] Load button clicked, URL:", config.ai_ollama_url)
|
||||
fetchOllamaModels(config.ai_ollama_url)
|
||||
}}
|
||||
onClick={() => fetchOllamaModels(config.ai_ollama_url)}
|
||||
disabled={loadingOllamaModels || !config.ai_ollama_url}
|
||||
>
|
||||
{loadingOllamaModels ? (
|
||||
|
||||
@@ -5,6 +5,7 @@ Blueprint pattern matching flask_health_routes.py / flask_security_routes.py.
|
||||
|
||||
import hmac
|
||||
import time
|
||||
import json
|
||||
import hashlib
|
||||
from collections import deque
|
||||
from flask import Blueprint, jsonify, request
|
||||
|
||||
Reference in New Issue
Block a user