playaround with debug to figure out ci failures
This commit is contained in:
7
index.js
7
index.js
@@ -2,7 +2,7 @@ import "dotenv/config";
|
||||
import { generateDungeon } from "./dungeonGenerator.js";
|
||||
import { generateDungeonImages } from "./imageGenerator.js";
|
||||
import { generatePDF } from "./generatePDF.js";
|
||||
import { OLLAMA_MODEL } from "./ollamaClient.js";
|
||||
import { OLLAMA_MODEL, listOpenWebUIModels } from "./ollamaClient.js";
|
||||
|
||||
// Utility to create a filesystem-safe filename from the dungeon title
|
||||
function slugify(text) {
|
||||
@@ -20,6 +20,11 @@ function slugify(text) {
|
||||
console.log("Using Ollama API URL:", process.env.OLLAMA_API_URL);
|
||||
console.log("Using Ollama model:", OLLAMA_MODEL);
|
||||
|
||||
// Try to list available models if using Open WebUI
|
||||
if (process.env.OLLAMA_API_URL?.includes("/api/chat/completions")) {
|
||||
await listOpenWebUIModels();
|
||||
}
|
||||
|
||||
// Generate the dungeon data
|
||||
const dungeonData = await generateDungeon();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user