Update 2025-04-13_16:26:04

This commit is contained in:
root
2025-04-13 16:26:06 +02:00
commit f5d5898dc4
2312 changed files with 422700 additions and 0 deletions

35
static/ollama.js Normal file
View File

@ -0,0 +1,35 @@
// ollama.js OpenAI-kompatibler API-Aufruf für Open-WebUI
export async function checkWithOllama(sequence) {
const prompt = sequence.join(" ");
try {
const response = await fetch("https://at1.dynproxy.net/api/chat/completions", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer sk-d0e3a491b19c435a975b234969298cd0"
},
body: JSON.stringify({
model: "gemma3:1b",
messages: [
{ role: "system", content: "Du bist ein Emoji-Detektiv für Kinder. Bewerte jedes Emoji in genau einer Zeile im Format: Position X: ✅ oder ❌ Emoji einfache, freundliche Begründung." },
{ role: "user", content: prompt } ],
stream: false
})
});
if (!response.ok) {
console.error("Ollama API Error:", response.status);
return "(Fehler beim LLM-Request)";
}
const data = await response.json();
return data.choices?.[0]?.message?.content?.trim() || "(keine Antwort vom Modell)";
} catch (error) {
console.error("LLM-Request fehlgeschlagen:", error);
return "(Verbindungsfehler mit Ollama)";
}
}