mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
feat(server): allow Ollama custom via OLLAMA_HOST env var
Update README to specify pulling the `qwen3-embedding:0.6b` model and document the optional `OLLAMA_HOST` environment variable. Adjust server code to import `EMBEDDING_MODEL`, use it for Ollama embeddings, and pass `process.env.OLLAMA_HOST` as the base URL.
This commit is contained in:
+4
-2
@@ -30,7 +30,7 @@ import {
|
||||
sectionContentToolMetadata,
|
||||
sectionContentToolName,
|
||||
} from "./agent-tools/index.js";
|
||||
import { STORAGE_DIR } from "./constants.js";
|
||||
import { EMBEDDING_MODEL, STORAGE_DIR } from "./constants.js";
|
||||
|
||||
// #region MCP Types
|
||||
|
||||
@@ -75,8 +75,10 @@ export interface SearchSpecMCPOutput extends McpToolOutputBase {
|
||||
// #endregion
|
||||
|
||||
// Initialize embeddings
|
||||
// OLLAMA_HOST env var is optional - @langchain/ollama defaults to http://localhost:11434
|
||||
const embeddings = new OllamaEmbeddings({
|
||||
model: "qwen3-embedding:0.6b",
|
||||
model: EMBEDDING_MODEL,
|
||||
baseUrl: process.env.OLLAMA_HOST,
|
||||
});
|
||||
|
||||
async function main() {
|
||||
|
||||
Reference in New Issue
Block a user