-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: knowledge base database engine
- Loading branch information
1 parent
b857659
commit 34ebab0
Showing
31 changed files
with
611 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
.yarn/patches/@llm-tools-embedjs-libsql-npm-0.1.25-fad000d74c.patch
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
.yarn/patches/@llm-tools-embedjs-npm-0.1.25-ec5645cf36.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/src/core/rag-embedding.js b/src/core/rag-embedding.js | ||
index 50c3c4064af17bc4c7c46554d8f2419b3afceb0e..632c9b2e04d2e0e3bb09ef1cd8f29d2560e6afc1 100644 | ||
--- a/src/core/rag-embedding.js | ||
+++ b/src/core/rag-embedding.js | ||
@@ -1,10 +1,8 @@ | ||
export class RAGEmbedding { | ||
static singleton; | ||
static async init(embeddingModel) { | ||
- if (!this.singleton) { | ||
- await embeddingModel.init(); | ||
- this.singleton = new RAGEmbedding(embeddingModel); | ||
- } | ||
+ await embeddingModel.init(); | ||
+ this.singleton = new RAGEmbedding(embeddingModel); | ||
} | ||
static getInstance() { | ||
return RAGEmbedding.singleton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { downloadNpmPackage } = require('./utils') | ||
|
||
async function downloadNpm(platform) { | ||
if (!platform || platform === 'mac') { | ||
downloadNpmPackage( | ||
'@lancedb/lancedb-darwin-arm64', | ||
'https://registry.npmjs.org/@lancedb/lancedb-darwin-arm64/-/lancedb-darwin-arm64-0.14.0.tgz' | ||
) | ||
downloadNpmPackage( | ||
'@lancedb/lancedb-darwin-x64', | ||
'https://registry.npmjs.org/@lancedb/lancedb-darwin-x64/-/lancedb-darwin-x64-0.14.0.tgz' | ||
) | ||
} | ||
|
||
if (!platform || platform === 'linux') { | ||
downloadNpmPackage( | ||
'@lancedb/lancedb-linux-arm64-gnu', | ||
'https://registry.npmjs.org/@lancedb/lancedb-linux-arm64-gnu/-/lancedb-linux-arm64-gnu-0.14.0.tgz' | ||
) | ||
downloadNpmPackage( | ||
'@lancedb/lancedb-linux-x64-gnu', | ||
'https://registry.npmjs.org/@lancedb/lancedb-linux-x64-gnu/-/lancedb-linux-x64-gnu-0.14.0.tgz' | ||
) | ||
} | ||
} | ||
|
||
const platformArg = process.argv[2] | ||
downloadNpm(platformArg) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.