Skip to content

Commit

Permalink
fix langchain-ai#1475 update faiss-node to catch native exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ewfian committed Jun 5, 2023
1 parent 6adecd2 commit a4d69ef
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@zilliz/milvus2-sdk-node": "^2.2.7",
"axios": "^0.26.0",
"chromadb": "^1.4.0",
"faiss-node": "^0.2.0",
"faiss-node": "^0.2.1",
"graphql": "^16.6.0",
"js-yaml": "^4.1.0",
"langchain": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-no-instanceof": "^1.0.1",
"eslint-plugin-prettier": "^4.2.1",
"faiss-node": "^0.2.0",
"faiss-node": "^0.2.1",
"google-auth-library": "^8.8.0",
"graphql": "^16.6.0",
"hnswlib-node": "^1.4.2",
Expand Down Expand Up @@ -503,7 +503,7 @@
"cohere-ai": "^5.0.2",
"d3-dsv": "^2.0.0",
"epub2": "^3.0.1",
"faiss-node": "^0.2.0",
"faiss-node": "^0.2.1",
"google-auth-library": "^8.8.0",
"hnswlib-node": "^1.4.2",
"html-to-text": "^9.0.5",
Expand Down
3 changes: 3 additions & 0 deletions langchain/src/vectorstores/tests/faiss.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,7 @@ test("Test FaissStore Exceptions", async () => {
}).rejects.toThrow(
"Query vector must have the same length as the number of dimensions (2)"
);
await expect(async () => {
await FaissStore.load("_fake_path", new FakeEmbeddings());
}).rejects.toThrow(/No such file or directory$/);
});
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14020,7 +14020,7 @@ __metadata:
eslint-config-prettier: ^8.6.0
eslint-plugin-import: ^2.27.5
eslint-plugin-prettier: ^4.2.1
faiss-node: ^0.2.0
faiss-node: ^0.2.1
graphql: ^16.6.0
js-yaml: ^4.1.0
langchain: "workspace:*"
Expand Down Expand Up @@ -14253,15 +14253,15 @@ __metadata:
languageName: node
linkType: hard

"faiss-node@npm:^0.2.0":
version: 0.2.0
resolution: "faiss-node@npm:0.2.0"
"faiss-node@npm:^0.2.1":
version: 0.2.1
resolution: "faiss-node@npm:0.2.1"
dependencies:
bindings: ^1.5.0
node-addon-api: ^6.0.0
node-gyp: latest
prebuild-install: ^7.1.1
checksum: df9623e55c1193fd42724b852bef7f3c81db68c5c2c689614974fb77eb8848eab8a75c28b5573b9e7bf4caab5b89a35aa09ab134ff450baa1fd7d9f5f6f66738
checksum: 1f17d0e4c9e3eabdb9b2e0df78770fad58d22d208bf643e55f198fe9a217dd1de583ff5bb43d342b6cdcf82dcaef2532922b5738cd55353ac3ff69e783db30fc
languageName: node
linkType: hard

Expand Down Expand Up @@ -18360,7 +18360,7 @@ __metadata:
eslint-plugin-no-instanceof: ^1.0.1
eslint-plugin-prettier: ^4.2.1
expr-eval: ^2.0.2
faiss-node: ^0.2.0
faiss-node: ^0.2.1
flat: ^5.0.2
google-auth-library: ^8.8.0
graphql: ^16.6.0
Expand Down Expand Up @@ -18427,7 +18427,7 @@ __metadata:
cohere-ai: ^5.0.2
d3-dsv: ^2.0.0
epub2: ^3.0.1
faiss-node: ^0.2.0
faiss-node: ^0.2.1
google-auth-library: ^8.8.0
hnswlib-node: ^1.4.2
html-to-text: ^9.0.5
Expand Down

0 comments on commit a4d69ef

Please sign in to comment.