fix(Knowledge): pass searchResultCount to embed-js (#8118)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user