This commit is contained in:
4
index.js
4
index.js
@@ -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();
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user