fix: reduce batch size for knowledge service and openai embeddings

This commit is contained in:
kangfenmao 2024-12-31 14:41:08 +08:00
parent 8ef9fb0216
commit b2818f8619

View File

@ -45,14 +45,14 @@ class KnowledgeService {
azureOpenAIApiDeploymentName: model,
azureOpenAIApiInstanceName: getInstanceName(baseURL),
dimensions,
batchSize: 15
batchSize: 10
})
: new OpenAiEmbeddings({
model,
apiKey,
configuration: { baseURL },
dimensions,
batchSize: 15
batchSize: 10
})
)
.setVectorDatabase(new LibSqlDb({ path: path.join(this.storageDir, id) }))