Skip to content

Commit

Permalink
Merge pull request #1119 from newrelic/add-new-langchain-vectorstores
Browse files Browse the repository at this point in the history
Add new langchain vectorstore models
  • Loading branch information
hmstepanek authored Apr 5, 2024
2 parents 9f9751d + 5364c53 commit 07040b3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions newrelic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2251,6 +2251,18 @@ def _process_module_builtin_defaults():
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.duckdb",
"newrelic.hooks.mlmodel_langchain",
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.ecloud_vector_search",
"newrelic.hooks.mlmodel_langchain",
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.elastic_vector_search",
"newrelic.hooks.mlmodel_langchain",
Expand Down Expand Up @@ -2299,6 +2311,12 @@ def _process_module_builtin_defaults():
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.inmemory",
"newrelic.hooks.mlmodel_langchain",
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.kdbai",
"newrelic.hooks.mlmodel_langchain",
Expand Down Expand Up @@ -2389,6 +2407,12 @@ def _process_module_builtin_defaults():
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.pathway",
"newrelic.hooks.mlmodel_langchain",
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.pgembedding",
"newrelic.hooks.mlmodel_langchain",
Expand Down Expand Up @@ -2533,6 +2557,12 @@ def _process_module_builtin_defaults():
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.vdms",
"newrelic.hooks.mlmodel_langchain",
"instrument_langchain_vectorstore_similarity_search",
)

_process_module_definition(
"langchain_community.vectorstores.vearch",
"newrelic.hooks.mlmodel_langchain",
Expand Down
5 changes: 5 additions & 0 deletions newrelic/hooks/mlmodel_langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"langchain_community.vectorstores.deeplake": "DeepLake",
"langchain_community.vectorstores.dingo": "Dingo",
"langchain_community.vectorstores.documentdb": "DocumentDBVectorSearch",
"langchain_community.vectorstores.duckdb": "DuckDB",
"langchain_community.vectorstores.ecloud_vector_search": "EcloudESVectorStore",
"langchain_community.vectorstores.elastic_vector_search": "ElasticVectorSearch",
# "langchain_community.vectorstores.elastic_vector_search": "ElasticKnnSearch", # Deprecated
"langchain_community.vectorstores.elasticsearch": "ElasticsearchStore",
Expand All @@ -63,6 +65,7 @@
"langchain_community.vectorstores.hippo": "Hippo",
"langchain_community.vectorstores.hologres": "Hologres",
"langchain_community.vectorstores.infinispanvs": "InfinispanVS",
"langchain_community.vectorstores.inmemory": "InMemoryVectorStore",
"langchain_community.vectorstores.kdbai": "KDBAI",
"langchain_community.vectorstores.kinetica": "Kinetica",
"langchain_community.vectorstores.lancedb": "LanceDB",
Expand All @@ -79,6 +82,7 @@
"langchain_community.vectorstores.thirdai_neuraldb": "NeuralDBVectorStore",
"langchain_community.vectorstores.nucliadb": "NucliaDB",
"langchain_community.vectorstores.opensearch_vector_search": "OpenSearchVectorSearch",
"langchain_community.vectorstores.pathway": "PathwayVectorClient",
"langchain_community.vectorstores.pgembedding": "PGEmbedding",
"langchain_community.vectorstores.pgvecto_rs": "PGVecto_rs",
"langchain_community.vectorstores.pgvector": "PGVector",
Expand All @@ -103,6 +107,7 @@
"langchain_community.vectorstores.typesense": "Typesense",
"langchain_community.vectorstores.usearch": "USearch",
"langchain_community.vectorstores.vald": "Vald",
"langchain_community.vectorstores.vdms": "VDMS",
"langchain_community.vectorstores.vearch": "Vearch",
"langchain_community.vectorstores.vectara": "Vectara",
"langchain_community.vectorstores.vespa": "VespaStore",
Expand Down

0 comments on commit 07040b3

Please sign in to comment.