We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb5d2ac commit db6c2efCopy full SHA for db6c2ef
libs/langchain-mongodb/langchain_mongodb/utils.py
@@ -26,6 +26,7 @@
26
import numpy as np
27
from pymongo import MongoClient
28
from pymongo.driver_info import DriverInfo
29
+from pymongo_search_utils import append_client_metadata
30
31
logger = logging.getLogger(__name__)
32
@@ -35,9 +36,7 @@
35
36
37
38
def _append_client_metadata(client: MongoClient) -> None:
- # append_metadata was added in PyMongo 4.14.0, but is a valid database name on earlier versions
39
- if callable(client.append_metadata):
40
- client.append_metadata(DRIVER_METADATA)
+ append_client_metadata(client=client, driver_info=DRIVER_METADATA)
41
42
43
def cosine_similarity(X: Matrix, Y: Matrix) -> np.ndarray:
0 commit comments