mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
fix(Knowledge): pass searchResultCount to embed-js (#8118)
This commit is contained in:
parent
bea664af0f
commit
df43cb7a90
@ -125,7 +125,8 @@ class KnowledgeService {
|
||||
apiKey,
|
||||
apiVersion,
|
||||
baseURL,
|
||||
dimensions
|
||||
dimensions,
|
||||
documentCount
|
||||
}: KnowledgeBaseParams): Promise<RAGApplication> => {
|
||||
let ragApplication: RAGApplication
|
||||
const embeddings = new Embeddings({
|
||||
@ -141,6 +142,7 @@ class KnowledgeService {
|
||||
.setModel('NO_MODEL')
|
||||
.setEmbeddingModel(embeddings)
|
||||
.setVectorDatabase(new LibSqlDb({ path: path.join(this.storageDir, id) }))
|
||||
.setSearchResultCount(documentCount || 30)
|
||||
.build()
|
||||
} catch (e) {
|
||||
Logger.error(e)
|
||||
|
||||
@ -51,9 +51,8 @@ export const getKnowledgeBaseParams = (base: KnowledgeBase): KnowledgeBaseParams
|
||||
rerankModelProvider: rerankProvider.name.toLowerCase(),
|
||||
// topN: base.topN,
|
||||
// preprocessing: base.preprocessing,
|
||||
preprocessOrOcrProvider: base.preprocessOrOcrProvider
|
||||
|
||||
// topN: base.topN
|
||||
preprocessOrOcrProvider: base.preprocessOrOcrProvider,
|
||||
documentCount: base.documentCount
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user