Skip to content

Commit

Permalink
Merge branch 'main' into fix-celery-instrumentation-missing
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino authored May 7, 2024
2 parents ca5dbe8 + 8884497 commit adf4902
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
18 changes: 18 additions & 0 deletions newrelic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2408,6 +2408,12 @@ def _process_module_builtin_defaults():
"instrument_langchain_vectorstore_similarity_search",
)

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

_process_module_definition(
"langchain_community.vectorstores.pathway",
"newrelic.hooks.mlmodel_langchain",
Expand Down Expand Up @@ -2444,6 +2450,12 @@ def _process_module_builtin_defaults():
"instrument_langchain_vectorstore_similarity_search",
)

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

_process_module_definition(
"langchain_community.vectorstores.rocksetdb",
"newrelic.hooks.mlmodel_langchain",
Expand Down Expand Up @@ -2546,6 +2558,12 @@ def _process_module_builtin_defaults():
"instrument_langchain_vectorstore_similarity_search",
)

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

_process_module_definition(
"langchain_community.vectorstores.usearch",
"newrelic.hooks.mlmodel_langchain",
Expand Down
3 changes: 3 additions & 0 deletions newrelic/hooks/mlmodel_langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"langchain_community.vectorstores.neo4j_vector": "Neo4jVector",
"langchain_community.vectorstores.thirdai_neuraldb": "NeuralDBVectorStore",
"langchain_community.vectorstores.nucliadb": "NucliaDB",
"langchain_community.vectorstores.oraclevs": "OracleVS",
"langchain_community.vectorstores.opensearch_vector_search": "OpenSearchVectorSearch",
"langchain_community.vectorstores.pathway": "PathwayVectorClient",
"langchain_community.vectorstores.pgembedding": "PGEmbedding",
Expand All @@ -89,6 +90,7 @@
"langchain_community.vectorstores.pinecone": "Pinecone",
"langchain_community.vectorstores.qdrant": "Qdrant",
"langchain_community.vectorstores.redis.base": "Redis",
"langchain_community.vectorstores.relyt": "Relyt",
"langchain_community.vectorstores.rocksetdb": "Rockset",
"langchain_community.vectorstores.scann": "ScaNN",
"langchain_community.vectorstores.semadb": "SemaDB",
Expand All @@ -105,6 +107,7 @@
"langchain_community.vectorstores.tiledb": "TileDB",
"langchain_community.vectorstores.timescalevector": "TimescaleVector",
"langchain_community.vectorstores.typesense": "Typesense",
"langchain_community.vectorstores.upstash": "UpstashVectorStore",
"langchain_community.vectorstores.usearch": "USearch",
"langchain_community.vectorstores.vald": "Vald",
"langchain_community.vectorstores.vdms": "VDMS",
Expand Down
2 changes: 1 addition & 1 deletion tests/mlmodel_langchain/test_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ def _test():
"create_function,call_function,input_",
(
(create_structured_output_runnable, "ainvoke", {"input": "Sally is 13"}),
(create_structured_output_chain, "arun", "Sally is 13"),
(create_structured_output_chain, "arun", "Sally is 13"), # Deprecated in 0.2.0
),
)
@reset_core_stats_engine()
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ deps =
mlmodel_openai-openailatest: openai[datalib]
; Required for openai testing
mlmodel_openai: protobuf
mlmodel_langchain: langchain
; Pinning to 0.1.16 while adding support for with_structured_output in chain tests
mlmodel_langchain: langchain<0.1.17
mlmodel_langchain: langchain-community
mlmodel_langchain: openai[datalib]
; Required for langchain testing
Expand Down

0 comments on commit adf4902

Please sign in to comment.