This commit is contained in:
Zacharias-Brohn
2026-01-14 19:15:48 +01:00
parent e479c24484
commit e2afe1a522
3 changed files with 15 additions and 2 deletions
+12
View File
@@ -0,0 +1,12 @@
import { Ollama } from 'ollama';
// Initialize Ollama with the host from environment variables
// defaulting to localhost if not specified.
// This ensures that OLLAMA_HOST is respected.
const host = process.env.OLLAMA_HOST || 'http://127.0.0.1:11434';
console.log(`Initializing Ollama client with host: ${host}`);
const ollama = new Ollama({ host });
export default ollama;