feat: reduce embedding batch size to 5

This commit is contained in:
kangfenmao 2025-02-04 12:35:42 +08:00
parent 2208ab7277
commit bfa61ae3ee

View File

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