Skip to content

Commit

Permalink
fix: reduce batch size for knowledge service and openai embeddings
Browse files Browse the repository at this point in the history
  • Loading branch information
kangfenmao committed Dec 31, 2024
1 parent 8ef9fb0 commit b2818f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/services/KnowledgeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) }))
Expand Down

0 comments on commit b2818f8

Please sign in to comment.