fix ollama model env var mismatch
Some checks failed
ci/woodpecker/cron/ci Pipeline failed

This commit is contained in:
2026-01-08 20:57:35 -05:00
parent 96480a351f
commit 1059eced53
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ import "dotenv/config";
import { generateDungeon } from "./dungeonGenerator.js"; import { generateDungeon } from "./dungeonGenerator.js";
import { generateDungeonImages } from "./imageGenerator.js"; import { generateDungeonImages } from "./imageGenerator.js";
import { generatePDF } from "./generatePDF.js"; import { generatePDF } from "./generatePDF.js";
import { DEFAULT_OLLAMA_MODEL } from "./ollamaClient.js"; import { OLLAMA_MODEL } from "./ollamaClient.js";
// Utility to create a filesystem-safe filename from the dungeon title // Utility to create a filesystem-safe filename from the dungeon title
function slugify(text) { function slugify(text) {
@@ -18,7 +18,7 @@ function slugify(text) {
throw new Error("OLLAMA_API_URL environment variable is required"); throw new Error("OLLAMA_API_URL environment variable is required");
} }
console.log("Using Ollama API URL:", process.env.OLLAMA_API_URL); console.log("Using Ollama API URL:", process.env.OLLAMA_API_URL);
console.log("Using Ollama model:", DEFAULT_OLLAMA_MODEL); console.log("Using Ollama model:", OLLAMA_MODEL);
// Generate the dungeon data // Generate the dungeon data
const dungeonData = await generateDungeon(); const dungeonData = await generateDungeon();

View File

@@ -1,6 +1,6 @@
const OLLAMA_API_URL = process.env.OLLAMA_API_URL; const OLLAMA_API_URL = process.env.OLLAMA_API_URL;
const OLLAMA_API_KEY = process.env.OLLAMA_API_KEY; const OLLAMA_API_KEY = process.env.OLLAMA_API_KEY;
export const OLLAMA_MODEL = process.env.OLLAMA_MODEL || "gemma3n:e4b"; export const OLLAMA_MODEL = process.env.OLLAMA_MODEL || "gemma3:4b";
function cleanText(str) { function cleanText(str) {
return str return str