File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
apps/sim/lib/knowledge/documents Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ export async function processDocumentAsync(
472472 overlap : rawConfig ?. overlap ?? 200 ,
473473 ollamaBaseUrl : rawConfig ?. ollamaBaseUrl ,
474474 }
475- const { provider : embeddingProvider , modelName : embeddingModelName } = parseEmbeddingModel (
475+ const { provider : embeddingProvider , modelName : kbModelName } = parseEmbeddingModel (
476476 kb [ 0 ] . embeddingModel
477477 )
478478
@@ -486,14 +486,14 @@ export async function processDocumentAsync(
486486 let ollamaContextLength : number | undefined
487487 if ( embeddingProvider === 'ollama' ) {
488488 ollamaContextLength = await getOllamaModelContextLength (
489- embeddingModelName ,
489+ kbModelName ,
490490 kbConfig . ollamaBaseUrl
491491 )
492492 const safeChunkSize = Math . floor ( ollamaContextLength * 0.3 )
493493 if ( effectiveChunkSize > safeChunkSize ) {
494494 logger . info (
495495 `[${ documentId } ] Capping chunk size from ${ effectiveChunkSize } to ${ safeChunkSize } tokens ` +
496- `(Ollama model ${ embeddingModelName } context length: ${ ollamaContextLength } )`
496+ `(Ollama model ${ kbModelName } context length: ${ ollamaContextLength } )`
497497 )
498498 effectiveChunkSize = safeChunkSize
499499 }
You can’t perform that action at this time.
0 commit comments