feat: add optional AI-based name generation for map entities

This commit is contained in:
Lupus 2026-03-15 02:22:15 +01:00
parent 3f9a7702d4
commit 5b98f55bc7
20 changed files with 1393 additions and 7 deletions

View file

@ -87,8 +87,9 @@ async function generateWithAnthropic({key, model, prompt, temperature, onContent
async function generateWithOllama({key, model, prompt, temperature, onContent}) {
const ollamaModelName = key; // for Ollama, 'key' is the actual model name entered by the user
const ollamaHost = localStorage.getItem("fmg-ai-ollama-host") || "http://localhost:11434";
const response = await fetch("http://localhost:11434/api/generate", {
const response = await fetch(`${ollamaHost}/api/generate`, {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({