-
Notifications
You must be signed in to change notification settings - Fork 498
feat: Add MongoDB driver metadata #2240
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
39caf01
3d2495e
77d9094
aebd485
c7020d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| "@llamaindex/mongodb": minor | ||
| "@llamaindex/azure": minor | ||
| "@llamaindex/tools": minor | ||
| "@llamaindex/examples": minor | ||
| --- | ||
|
|
||
| Update storage providers to append MongoDB client metadata | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ import type { | |
| import { BaseChatStore } from "@llamaindex/core/storage/chat-store"; | ||
| import type { Collection } from "mongodb"; | ||
| import { MongoClient } from "mongodb"; | ||
| import pkg from "../../package.json"; | ||
|
|
||
| const DEFAULT_CHAT_DATABASE = "ChatStoreDB"; | ||
| const DEFAULT_CHAT_Collection = "ChatStoreCollection"; | ||
|
|
||
|
|
@@ -40,6 +42,10 @@ export class AzureCosmosVCoreChatStore< | |
| "MongoClient is required for AzureCosmosVCoreChatStore initialization", | ||
| ); | ||
| } | ||
| mongoClient.appendMetadata({ | ||
| name: "LLAMAINDEX_AZURE_COSMOS_VCORE_CHAT_STORE", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If possible, we try and include the package version. But it isn't always feasible because it usually requires reading the package.json file, which some codebases don't like ( I suggest adding the packages versions and asking the team what they think.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea. |
||
| version: pkg.version, | ||
| }); | ||
| this.mongoClient = mongoClient; | ||
| this.dbName = dbName; | ||
| this.collectionName = collectionName; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,6 @@ | |
| "@llamaindex/env": "workspace:*" | ||
| }, | ||
| "dependencies": { | ||
| "mongodb": "6.7.0" | ||
| "mongodb": "6.21.0" | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file accidentally committed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, not an accident. Changesets is how this project manages versioning.
Here's a similar PR we are working on, which also has a similar change: langchain-ai/langgraphjs#1777