chore: add config.baseURL fallback for Ollama host
This commit is contained in:
@@ -12,7 +12,7 @@ export class OllamaEmbedder implements Embedder {
|
|||||||
|
|
||||||
constructor(config: EmbeddingConfig) {
|
constructor(config: EmbeddingConfig) {
|
||||||
this.ollama = new Ollama({
|
this.ollama = new Ollama({
|
||||||
host: config.url || "http://localhost:11434",
|
host: config.url || config.baseURL || "http://localhost:11434",
|
||||||
});
|
});
|
||||||
this.model = config.model || "nomic-embed-text:latest";
|
this.model = config.model || "nomic-embed-text:latest";
|
||||||
this.embeddingDims = config.embeddingDims || 768;
|
this.embeddingDims = config.embeddingDims || 768;
|
||||||
|
|||||||
Reference in New Issue
Block a user