Skip to content

Commit e89e3c2

Browse files
committed
fix: null-coalesce embeddingDimension and update stale error message
1 parent 578171c commit e89e3c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/sim/lib/knowledge/documents/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ export async function processDocumentAsync(
492492
if (kbConfig.ollamaBaseUrl && !isAllowedOllamaUrl(kbConfig.ollamaBaseUrl)) {
493493
throw new Error(
494494
`Knowledge base has a disallowed Ollama URL: ${kbConfig.ollamaBaseUrl}. ` +
495-
'The URL must point to localhost, a private network address, or a Docker service hostname.'
495+
'The URL must point to localhost, a private IP address, or host.docker.internal.'
496496
)
497497
}
498498
ollamaContextLength = await getOllamaModelContextLength(
@@ -697,7 +697,7 @@ export async function processDocumentAsync(
697697
await insertKBEmbeddings(
698698
knowledgeBaseId,
699699
embeddingRecords,
700-
kb[0].embeddingDimension,
700+
kb[0].embeddingDimension ?? 768,
701701
tx
702702
)
703703
} else {

0 commit comments

Comments
 (0)