Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ada7503 commit 2605d09Copy full SHA for 2605d09
1 file changed
packages/core/src/embedding/ollama-embedding.ts
@@ -92,13 +92,11 @@ export class OllamaEmbedding extends Embedding {
92
// Preprocess all texts
93
const processedTexts = this.preprocessTexts(texts);
94
95
- // Detect dimension on first use
+ // Detect dimension on first use if not configured
96
if (!this.dimensionDetected && !this.config.dimension) {
97
this.dimension = await this.detectDimension();
98
this.dimensionDetected = true;
99
console.log(`📏 Detected Ollama embedding dimension: ${this.dimension} for model: ${this.config.model}`);
100
- } else {
101
- throw new Error('Failed to detect dimension for model ' + this.config.model);
102
}
103
104
// Use Ollama's native batch embedding API
0 commit comments