Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump momento dependency and refactor search hit usage #3203

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@elastic/elasticsearch": "^8.4.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on the PR! I noticed that the dependency "@gomomento/sdk" has been updated to version "^1.47.1", which is a change in the peer/dev/hard dependencies. This comment is to flag the change for maintainers to review.

"@getmetal/metal-sdk": "^4.0.0",
"@getzep/zep-js": "^0.9.0",
"@gomomento/sdk": "^1.44.1",
"@gomomento/sdk": "^1.47.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumps the examples Momento client.

"@opensearch-project/opensearch": "^2.2.0",
"@pinecone-database/pinecone": "^1.1.0",
"@planetscale/database": "^1.8.0",
Expand Down
10 changes: 5 additions & 5 deletions langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,8 @@
"@faker-js/faker": "^7.6.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on the PR! I noticed that the dependency on "@gomomento/sdk" and "@gomomento/sdk-core" has been updated to a newer version. This comment is just to flag the change for maintainers to review, as it affects the peer/dev/hard dependencies of the project.

"@getmetal/metal-sdk": "^4.0.0",
"@getzep/zep-js": "^0.9.0",
"@gomomento/sdk": "^1.44.1",
"@gomomento/sdk-core": "^1.44.1",
"@gomomento/sdk": "^1.47.1",
"@gomomento/sdk-core": "^1.47.1",
Comment on lines -841 to +842
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumps the dev dependencies for @gomomento/sdk-core and @gomomento/sdk. We need sdk-core because it contains the interface types we code the integration against. We need @gomomento/sdk for the integration tests.

"@google-ai/generativelanguage": "^0.2.1",
"@google-cloud/storage": "^6.10.1",
"@huggingface/inference": "^2.6.4",
Expand Down Expand Up @@ -974,9 +974,9 @@
"@elastic/elasticsearch": "^8.4.0",
"@getmetal/metal-sdk": "*",
"@getzep/zep-js": "^0.9.0",
"@gomomento/sdk": "^1.44.1",
"@gomomento/sdk-core": "^1.44.1",
"@gomomento/sdk-web": "^1.44.1",
"@gomomento/sdk": "^1.47.1",
"@gomomento/sdk-core": "^1.47.1",
"@gomomento/sdk-web": "^1.47.1",
Comment on lines -977 to +979
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the peer dependencies we need @gomomento/sdk, the Momento Node.js client; @gomomento/sdk-web, the Momento JavaScript Web client; and @gomomento/sdk-core, the shared messages and interface library. The last one is still needed as a peer dependency for the build to work, but users only need install sdk or sdk-web.

"@google-ai/generativelanguage": "^0.2.1",
"@google-cloud/storage": "^6.10.1",
"@huggingface/inference": "^2.6.4",
Expand Down
2 changes: 1 addition & 1 deletion langchain/src/vectorstores/momento_vector_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export class MomentoVectorIndex extends VectorStore {
)
),
}),
hit.distance,
hit.score,
]);
} else if (response instanceof VectorSearch.Error) {
throw new Error(response.toString());
Expand Down
62 changes: 31 additions & 31 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7146,39 +7146,39 @@ __metadata:
languageName: node
linkType: hard

"@gomomento/generated-types@npm:0.87.0":
version: 0.87.0
resolution: "@gomomento/generated-types@npm:0.87.0"
"@gomomento/generated-types@npm:0.91.1":
version: 0.91.1
resolution: "@gomomento/generated-types@npm:0.91.1"
dependencies:
"@grpc/grpc-js": 1.9.0
google-protobuf: 3.21.2
grpc-tools: ^1.12.4
protoc-gen-ts: ^0.8.6
checksum: 30e35a2d2ae4a7a8aca1274ca72132ce9a7070189eee7cacd106fb2e619cca194f8b95ea9f19c10dc8b8d3277f3f5b9303a5763f0a6b9d739b23007b41f5bfad
checksum: 25e987e2b2982323cf3e0955cb0cfa87d702678313da3378d35160d918d95f6e0d02845b25f3480e5da0b274beaf129e272811145a21f5df6d30ddb8676eca65
languageName: node
linkType: hard

"@gomomento/sdk-core@npm:1.44.1, @gomomento/sdk-core@npm:^1.44.1":
version: 1.44.1
resolution: "@gomomento/sdk-core@npm:1.44.1"
"@gomomento/sdk-core@npm:1.47.1, @gomomento/sdk-core@npm:^1.47.1":
version: 1.47.1
resolution: "@gomomento/sdk-core@npm:1.47.1"
dependencies:
buffer: ^6.0.3
buffer: 6.0.3
jwt-decode: 3.1.2
checksum: adb69c48e97cf7703ecef2b7430eb1fca01f062ceab93bea723ff5211e4f4b7ce083ccb8fe8460037b0aa92970369e136107086dc3586c5ca9f8a64b84f07592
checksum: 0ee894f4be6fab02b454f77a7592744c7da0788d7d37efbe91a3453b1a14f44683319c16c403bf864613fa56e4ec3309ec9f843d919ec625f8c7ddc2140c73e1
languageName: node
linkType: hard

"@gomomento/sdk@npm:^1.44.1":
version: 1.44.1
resolution: "@gomomento/sdk@npm:1.44.1"
"@gomomento/sdk@npm:^1.47.1":
version: 1.47.1
resolution: "@gomomento/sdk@npm:1.47.1"
dependencies:
"@gomomento/generated-types": 0.87.0
"@gomomento/sdk-core": 1.44.1
"@gomomento/generated-types": 0.91.1
"@gomomento/sdk-core": 1.47.1
"@grpc/grpc-js": 1.9.0
"@types/google-protobuf": 3.15.6
google-protobuf: 3.21.2
jwt-decode: 3.1.2
checksum: a281c1ea350505bb5ae2d067ab73d90b04bdd9944de832c73f1bd95d81ccca554f7684527e97d50f98daa0ecc58cd9f85a4be22b1a9e3ffa7f9b3c00c0996f95
checksum: cf59a371855109b80bd95ca9f010e5cc94ca1ee130999a9dc5477b064e0352ad6f82e6e5cb3419610d4e21ae7b90b9f4b982463ea6ad5287b81553a1a587b804
languageName: node
linkType: hard

Expand Down Expand Up @@ -13545,23 +13545,23 @@ __metadata:
languageName: node
linkType: hard

"buffer@npm:^5.2.1, buffer@npm:^5.5.0":
version: 5.7.1
resolution: "buffer@npm:5.7.1"
"buffer@npm:6.0.3, buffer@npm:^6.0.3":
version: 6.0.3
resolution: "buffer@npm:6.0.3"
dependencies:
base64-js: ^1.3.1
ieee754: ^1.1.13
checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84
ieee754: ^1.2.1
checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9
languageName: node
linkType: hard

"buffer@npm:^6.0.3":
version: 6.0.3
resolution: "buffer@npm:6.0.3"
"buffer@npm:^5.2.1, buffer@npm:^5.5.0":
version: 5.7.1
resolution: "buffer@npm:5.7.1"
dependencies:
base64-js: ^1.3.1
ieee754: ^1.2.1
checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9
ieee754: ^1.1.13
checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84
languageName: node
linkType: hard

Expand Down Expand Up @@ -17144,7 +17144,7 @@ __metadata:
"@elastic/elasticsearch": ^8.4.0
"@getmetal/metal-sdk": ^4.0.0
"@getzep/zep-js": ^0.9.0
"@gomomento/sdk": ^1.44.1
"@gomomento/sdk": ^1.47.1
"@opensearch-project/opensearch": ^2.2.0
"@pinecone-database/pinecone": ^1.1.0
"@planetscale/database": ^1.8.0
Expand Down Expand Up @@ -21588,8 +21588,8 @@ __metadata:
"@faker-js/faker": ^7.6.0
"@getmetal/metal-sdk": ^4.0.0
"@getzep/zep-js": ^0.9.0
"@gomomento/sdk": ^1.44.1
"@gomomento/sdk-core": ^1.44.1
"@gomomento/sdk": ^1.47.1
"@gomomento/sdk-core": ^1.47.1
"@google-ai/generativelanguage": ^0.2.1
"@google-cloud/storage": ^6.10.1
"@huggingface/inference": ^2.6.4
Expand Down Expand Up @@ -21743,9 +21743,9 @@ __metadata:
"@elastic/elasticsearch": ^8.4.0
"@getmetal/metal-sdk": "*"
"@getzep/zep-js": ^0.9.0
"@gomomento/sdk": ^1.44.1
"@gomomento/sdk-core": ^1.44.1
"@gomomento/sdk-web": ^1.44.1
"@gomomento/sdk": ^1.47.1
"@gomomento/sdk-core": ^1.47.1
"@gomomento/sdk-web": ^1.47.1
"@google-ai/generativelanguage": ^0.2.1
"@google-cloud/storage": ^6.10.1
"@huggingface/inference": ^2.6.4
Expand Down