Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.
TypeScript agent-harnessagent-harness-engineeringai-engineeringai-observabilityamd-gpuclaude-codeclickhousecodexcoding-agentcoding-agentscursorgenaigpu-monitoringllm-observabilityllmopsnvidia-smiobservabilityopen-sourceopenaiopentelemetry
[Feat]: Support for langchain_community.chat_models (#390)
patcher94e3cf4a5a765
diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.tomlindex 172ad053..8819a15c 100644--- a/sdk/python/pyproject.toml+++ b/sdk/python/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "openlit"-version = "1.18.2"+version = "1.19.0"description = "OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications and GPUs, facilitating the integration of observability into your GenAI-driven projects"authors = ["OpenLIT"]repository = "https://github.com/openlit/openlit/tree/main/openlit/python"diff --git a/sdk/python/src/openlit/instrumentation/langchain/__init__.py b/sdk/python/src/openlit/instrumentation/langchain/__init__.pyindex 2d5037a1..00449f3a 100644--- a/sdk/python/src/openlit/instrumentation/langchain/__init__.py+++ b/sdk/python/src/openlit/instrumentation/langchain/__init__.py@@ -6,10 +6,10 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentorfrom wrapt import wrap_function_wrapperfrom openlit.instrumentation.langchain.langchain import (- general_wrap,- hub,- llm,- allm,+ general_wrap,+ hub,+ llm,+ allm,chat,achat)diff --git a/sdk/python/src/openlit/instrumentation/langchain/langchain.py b/sdk/python/src/openlit/instrumentation/langchain/langchain.pyindex d9613288..da993fdb 100644--- a/sdk/python/src/openlit/instrumentation/langchain/langchain.py+++ b/sdk/python/src/openlit/instrumentation/langchain/langchain.py@@ -1,4 +1,4 @@-# pylint: disable=duplicate-code, broad-exception-caught, too-many-statements, unused-argument+# pylint: disable=duplicate-code, broad-exception-caught, too-many-statements, unused-argument, unused-import"""Module for monitoring Langchain applications."""@@ -709,4 +709,4 @@ def achat(gen_ai_endpoint, version, environment, application_name,# Return original responsereturn response- return wrapper\ No newline at end of file+ return wrapperdiff --git a/sdk/python/tests/test_langchain.py.hold b/sdk/python/tests/test_langchain.pysimilarity index 94%rename from sdk/python/tests/test_langchain.py.holdrename to sdk/python/tests/test_langchain.pyindex bc0bb7cc..337a2fff 100644--- a/sdk/python/tests/test_langchain.py.hold+++ b/sdk/python/tests/test_langchain.py@@ -12,7 +12,6 @@ prior to running these tests.import osimport bs4-from langchain import hubfrom langchain_community.document_loaders import WebBaseLoaderfrom langchain_text_splitters import RecursiveCharacterTextSplitterimport openlit@@ -56,6 +55,3 @@ def test_langchain():texts = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)splits = texts.split_documents(docs)assert splits[0].metadata["source"] == "https://lilianweng.github.io/posts/2023-06-23-agent/"-- prompt = hub.pull("rlm/rag-prompt")- assert prompt.metadata["lc_hub_repo"] == "rag-prompt"