mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-23 23:57:23 +01:00
feat: add optional AI-based name generation for map entities
This commit is contained in:
parent
3f9a7702d4
commit
5b98f55bc7
20 changed files with 1393 additions and 7 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue