From 5b135aa9c8c2fec79b7a491329ca0215997dccc2 Mon Sep 17 00:00:00 2001 From: Dmitri Khokhlov Date: Sat, 28 Feb 2026 20:30:18 -0800 Subject: [PATCH] fix: pass OLLAMA_HOST to Ollama JS client constructor Fixes #3 --- src/core/embeddings.ts | 2 +- src/tools/semantic-navigate.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/embeddings.ts b/src/core/embeddings.ts index f07eb56..330a7e7 100644 --- a/src/core/embeddings.ts +++ b/src/core/embeddings.ts @@ -64,7 +64,7 @@ const MIN_EMBED_BATCH_SIZE = 5; const MAX_EMBED_BATCH_SIZE = 10; const DEFAULT_EMBED_BATCH_SIZE = 8; -const ollama = new Ollama(); +const ollama = new Ollama({ host: process.env.OLLAMA_HOST }); function toIntegerOr(value: string | undefined, fallback: number): number { if (!value) return fallback; diff --git a/src/tools/semantic-navigate.ts b/src/tools/semantic-navigate.ts index 54fa1b0..a7a07f9 100644 --- a/src/tools/semantic-navigate.ts +++ b/src/tools/semantic-navigate.ts @@ -32,7 +32,7 @@ const EMBED_MODEL = process.env.OLLAMA_EMBED_MODEL ?? "nomic-embed-text"; const CHAT_MODEL = process.env.OLLAMA_CHAT_MODEL ?? "llama3.2"; const MAX_FILES_PER_LEAF = 20; -const ollama = new Ollama(); +const ollama = new Ollama({ host: process.env.OLLAMA_HOST }); async function fetchEmbeddings(inputs: string[]): Promise { return fetchEmbedding(inputs);