langtrace-python-sdk 2.0.12__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/PKG-INFO +30 -15
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/README.md +26 -12
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/pyproject.toml +7 -5
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/pinecone_example/basic.py +7 -2
- langtrace_python_sdk-2.1.0/src/examples/weaviate_example/query_text.py +1737 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/__init__.py +7 -1
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/common.py +1 -0
- langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +44 -0
- langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/instrumentation/chroma/patch.py +265 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/openai/patch.py +1 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +1 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +28 -4
- langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +66 -0
- langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +166 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/langtrace.py +4 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/types/__init__.py +1 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/utils/__init__.py +0 -2
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/utils/llm.py +0 -1
- langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/utils/misc.py +30 -0
- langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/utils/types.py +19 -0
- langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/utils/with_root_span.py +176 -0
- langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/version.py +1 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/cohere/cassettes/test_cohere_chat.yaml +19 -21
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +73 -135
- langtrace_python_sdk-2.1.0/src/tests/cohere/cassettes/test_cohere_embed.yaml +73 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +8 -8
- langtrace_python_sdk-2.0.12/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -74
- langtrace_python_sdk-2.0.12/src/langtrace_python_sdk/utils/with_root_span.py +0 -81
- langtrace_python_sdk-2.0.12/src/langtrace_python_sdk/version.py +0 -1
- langtrace_python_sdk-2.0.12/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -73
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/.gitignore +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/LICENSE +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/anthropic_example/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/anthropic_example/completion.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/chroma_example/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/chroma_example/basic.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/cohere_example/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/cohere_example/chat.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/cohere_example/chat_stream.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/cohere_example/embed.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/cohere_example/rerank.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/cohere_example/tools.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/fastapi_example/basic_route.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/hiveagent_example/basic.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/langchain_example/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/langchain_example/basic.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/langchain_example/groq_example.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/langchain_example/langgraph_example.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/langchain_example/tool.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/llamaindex_example/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/llamaindex_example/agent.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/llamaindex_example/basic.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/llamaindex_example/data/abramov.txt +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/async_tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/async_tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/chat_completion.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/embeddings_create.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/function_calling.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/images_generate.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/tool_calling.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/openai_example/tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/perplexity_example/basic.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/pinecone_example/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/qdrant_example/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/qdrant_example/basic.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/extensions/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
- {langtrace_python_sdk-2.0.12/src/tests → langtrace_python_sdk-2.1.0/src/langtrace_python_sdk/instrumentation/weaviate}/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/run_example.py +0 -0
- /langtrace_python_sdk-2.0.12/src/langtrace_python_sdk/utils/types.py → /langtrace_python_sdk-2.1.0/src/tests/__init__.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/anthropic/conftest.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/anthropic/test_anthropic.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/chroma/conftest.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/chroma/test_chroma.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/cohere/conftest.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/cohere/test_cohere_chat.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/cohere/test_cohere_embed.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/cohere/test_cohere_rerank.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/conftest.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/langchain/test_langchain.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/langchain/test_langchain_community.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/langchain/test_langchain_core.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/conftest.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/test_chat_completion.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/test_embeddings.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/openai/test_image_generation.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/pinecone/conftest.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/pinecone/test_pinecone.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/qdrant/conftest.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/qdrant/test_qdrant.py +0 -0
- {langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: langtrace-python-sdk
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Python SDK for LangTrace
|
|
5
5
|
Project-URL: Homepage, https://github.com/Scale3-Labs/langtrace-python-sdk
|
|
6
6
|
Author-email: Scale3 Labs <engineering@scale3labs.com>
|
|
@@ -17,7 +17,8 @@ Requires-Dist: opentelemetry-instrumentation
|
|
|
17
17
|
Requires-Dist: opentelemetry-sdk
|
|
18
18
|
Requires-Dist: pinecone-client
|
|
19
19
|
Requires-Dist: tiktoken
|
|
20
|
-
Requires-Dist: trace-attributes>=
|
|
20
|
+
Requires-Dist: trace-attributes>=4.0.2
|
|
21
|
+
Requires-Dist: weaviate-client
|
|
21
22
|
Provides-Extra: dev
|
|
22
23
|
Requires-Dist: anthropic; extra == 'dev'
|
|
23
24
|
Requires-Dist: chromadb; extra == 'dev'
|
|
@@ -25,10 +26,10 @@ Requires-Dist: cohere; extra == 'dev'
|
|
|
25
26
|
Requires-Dist: langchain; extra == 'dev'
|
|
26
27
|
Requires-Dist: langchain-community; extra == 'dev'
|
|
27
28
|
Requires-Dist: langchain-openai; extra == 'dev'
|
|
28
|
-
Requires-Dist: llama-index; extra == 'dev'
|
|
29
29
|
Requires-Dist: openai; extra == 'dev'
|
|
30
30
|
Requires-Dist: python-dotenv; extra == 'dev'
|
|
31
31
|
Requires-Dist: qdrant-client; extra == 'dev'
|
|
32
|
+
Requires-Dist: weaviate-client; extra == 'dev'
|
|
32
33
|
Provides-Extra: test
|
|
33
34
|
Requires-Dist: pytest; extra == 'test'
|
|
34
35
|
Requires-Dist: pytest-asyncio; extra == 'test'
|
|
@@ -65,24 +66,25 @@ To use the managed SaaS version of Langtrace, follow the steps below:
|
|
|
65
66
|
|
|
66
67
|
Get started by adding simply three lines to your code!
|
|
67
68
|
|
|
68
|
-
```
|
|
69
|
+
```python
|
|
69
70
|
pip install langtrace-python-sdk
|
|
70
71
|
```
|
|
71
72
|
|
|
72
|
-
```
|
|
73
|
+
```python
|
|
73
74
|
from langtrace_python_sdk import langtrace # Must precede any llm module imports
|
|
74
75
|
langtrace.init(api_key=<your_api_key>)
|
|
75
76
|
```
|
|
76
77
|
|
|
77
78
|
OR
|
|
78
79
|
|
|
79
|
-
```
|
|
80
|
+
```python
|
|
80
81
|
from langtrace_python_sdk import langtrace # Must precede any llm module imports
|
|
81
82
|
langtrace.init() # LANGTRACE_API_KEY as an ENVIRONMENT variable
|
|
82
83
|
```
|
|
83
84
|
|
|
84
85
|
## FastAPI Quick Start
|
|
85
|
-
|
|
86
|
+
|
|
87
|
+
Initialize FastAPI project and add this inside the `main.py` file
|
|
86
88
|
|
|
87
89
|
```python
|
|
88
90
|
from fastapi import FastAPI
|
|
@@ -104,7 +106,9 @@ def root():
|
|
|
104
106
|
```
|
|
105
107
|
|
|
106
108
|
## Django Quick Start
|
|
107
|
-
|
|
109
|
+
|
|
110
|
+
Initialize django project and add this inside the `__init.py__` file
|
|
111
|
+
|
|
108
112
|
```python
|
|
109
113
|
from langtrace_python_sdk import langtrace
|
|
110
114
|
from openai import OpenAI
|
|
@@ -122,7 +126,9 @@ client.chat.completions.create(
|
|
|
122
126
|
```
|
|
123
127
|
|
|
124
128
|
## Flask Quick Start
|
|
125
|
-
|
|
129
|
+
|
|
130
|
+
Initialize flask project and this inside `app.py` file
|
|
131
|
+
|
|
126
132
|
```python
|
|
127
133
|
from flask import Flask
|
|
128
134
|
from langtrace_python_sdk import langtrace
|
|
@@ -147,11 +153,11 @@ def main():
|
|
|
147
153
|
|
|
148
154
|
Get started by adding simply two lines to your code and see traces being logged to the console!
|
|
149
155
|
|
|
150
|
-
```
|
|
156
|
+
```python
|
|
151
157
|
pip install langtrace-python-sdk
|
|
152
158
|
```
|
|
153
159
|
|
|
154
|
-
```
|
|
160
|
+
```python
|
|
155
161
|
from langtrace_python_sdk import langtrace # Must precede any llm module imports
|
|
156
162
|
langtrace.init(write_spans_to_console=True)
|
|
157
163
|
```
|
|
@@ -160,15 +166,26 @@ langtrace.init(write_spans_to_console=True)
|
|
|
160
166
|
|
|
161
167
|
Get started by adding simply three lines to your code and see traces being exported to your remote location!
|
|
162
168
|
|
|
163
|
-
```
|
|
169
|
+
```python
|
|
164
170
|
pip install langtrace-python-sdk
|
|
165
171
|
```
|
|
166
172
|
|
|
167
|
-
```
|
|
173
|
+
```python
|
|
168
174
|
from langtrace_python_sdk import langtrace # Must precede any llm module imports
|
|
169
175
|
langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
|
|
170
176
|
```
|
|
171
177
|
|
|
178
|
+
### Configure Langtrace
|
|
179
|
+
|
|
180
|
+
| Parameter | Type | Default Value | Description |
|
|
181
|
+
| -------------------------- | ----------------------------------- | ----------------------------- | ------------------------------------------------------------------------------ |
|
|
182
|
+
| `api_key` | `str` | `LANGTRACE_API_KEY` or `None` | The API key for authentication. |
|
|
183
|
+
| `batch` | `bool` | `True` | Whether to batch spans before sending them. |
|
|
184
|
+
| `write_spans_to_console` | `bool` | `False` | Whether to write spans to the console. |
|
|
185
|
+
| `custom_remote_exporter` | `Optional[Exporter]` | `None` | Custom remote exporter. If `None`, a default `LangTraceExporter` will be used. |
|
|
186
|
+
| `api_host` | `Optional[str]` | `https://langtrace.ai/` | The API host for the remote exporter. |
|
|
187
|
+
| `disable_instrumentations` | `Optional[DisableInstrumentations]` | `None` | You can pass an object to disable instrumentation for specific vendors ex: `{'only': ['openai']}` or `{'all_except': ['openai']}`
|
|
188
|
+
|
|
172
189
|
### Additional Customization
|
|
173
190
|
|
|
174
191
|
- `@with_langtrace_root_span` - this decorator is designed to organize and relate different spans, in a hierarchical manner. When you're performing multiple operations that you want to monitor together as a unit, this function helps by establishing a "parent" (`LangtraceRootSpan` or whatever is passed to `name`) span. Then, any calls to the LLM APIs made within the given function (fn) will be considered "children" of this parent span. This setup is especially useful for tracking the performance or behavior of a group of operations collectively, rather than individually.
|
|
@@ -186,7 +203,6 @@ def example():
|
|
|
186
203
|
return response
|
|
187
204
|
```
|
|
188
205
|
|
|
189
|
-
|
|
190
206
|
- `with_additional_attributes` - this function is designed to enhance the traces by adding custom attributes to the current context. These custom attributes provide extra details about the operations being performed, making it easier to analyze and understand their behavior.
|
|
191
207
|
|
|
192
208
|
```python
|
|
@@ -223,7 +239,6 @@ def chat_completion():
|
|
|
223
239
|
|
|
224
240
|
- `get_prompt_from_registry` - this function is designed to fetch the desired prompt from the `Prompt Registry`. You can pass two options for filtering `prompt_version` & `variables`.
|
|
225
241
|
|
|
226
|
-
|
|
227
242
|
```python
|
|
228
243
|
from langtrace_python_sdk import get_prompt_from_registry
|
|
229
244
|
|
|
@@ -28,24 +28,25 @@ To use the managed SaaS version of Langtrace, follow the steps below:
|
|
|
28
28
|
|
|
29
29
|
Get started by adding simply three lines to your code!
|
|
30
30
|
|
|
31
|
-
```
|
|
31
|
+
```python
|
|
32
32
|
pip install langtrace-python-sdk
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
```
|
|
35
|
+
```python
|
|
36
36
|
from langtrace_python_sdk import langtrace # Must precede any llm module imports
|
|
37
37
|
langtrace.init(api_key=<your_api_key>)
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
OR
|
|
41
41
|
|
|
42
|
-
```
|
|
42
|
+
```python
|
|
43
43
|
from langtrace_python_sdk import langtrace # Must precede any llm module imports
|
|
44
44
|
langtrace.init() # LANGTRACE_API_KEY as an ENVIRONMENT variable
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
## FastAPI Quick Start
|
|
48
|
-
|
|
48
|
+
|
|
49
|
+
Initialize FastAPI project and add this inside the `main.py` file
|
|
49
50
|
|
|
50
51
|
```python
|
|
51
52
|
from fastapi import FastAPI
|
|
@@ -67,7 +68,9 @@ def root():
|
|
|
67
68
|
```
|
|
68
69
|
|
|
69
70
|
## Django Quick Start
|
|
70
|
-
|
|
71
|
+
|
|
72
|
+
Initialize django project and add this inside the `__init.py__` file
|
|
73
|
+
|
|
71
74
|
```python
|
|
72
75
|
from langtrace_python_sdk import langtrace
|
|
73
76
|
from openai import OpenAI
|
|
@@ -85,7 +88,9 @@ client.chat.completions.create(
|
|
|
85
88
|
```
|
|
86
89
|
|
|
87
90
|
## Flask Quick Start
|
|
88
|
-
|
|
91
|
+
|
|
92
|
+
Initialize flask project and this inside `app.py` file
|
|
93
|
+
|
|
89
94
|
```python
|
|
90
95
|
from flask import Flask
|
|
91
96
|
from langtrace_python_sdk import langtrace
|
|
@@ -110,11 +115,11 @@ def main():
|
|
|
110
115
|
|
|
111
116
|
Get started by adding simply two lines to your code and see traces being logged to the console!
|
|
112
117
|
|
|
113
|
-
```
|
|
118
|
+
```python
|
|
114
119
|
pip install langtrace-python-sdk
|
|
115
120
|
```
|
|
116
121
|
|
|
117
|
-
```
|
|
122
|
+
```python
|
|
118
123
|
from langtrace_python_sdk import langtrace # Must precede any llm module imports
|
|
119
124
|
langtrace.init(write_spans_to_console=True)
|
|
120
125
|
```
|
|
@@ -123,15 +128,26 @@ langtrace.init(write_spans_to_console=True)
|
|
|
123
128
|
|
|
124
129
|
Get started by adding simply three lines to your code and see traces being exported to your remote location!
|
|
125
130
|
|
|
126
|
-
```
|
|
131
|
+
```python
|
|
127
132
|
pip install langtrace-python-sdk
|
|
128
133
|
```
|
|
129
134
|
|
|
130
|
-
```
|
|
135
|
+
```python
|
|
131
136
|
from langtrace_python_sdk import langtrace # Must precede any llm module imports
|
|
132
137
|
langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
|
|
133
138
|
```
|
|
134
139
|
|
|
140
|
+
### Configure Langtrace
|
|
141
|
+
|
|
142
|
+
| Parameter | Type | Default Value | Description |
|
|
143
|
+
| -------------------------- | ----------------------------------- | ----------------------------- | ------------------------------------------------------------------------------ |
|
|
144
|
+
| `api_key` | `str` | `LANGTRACE_API_KEY` or `None` | The API key for authentication. |
|
|
145
|
+
| `batch` | `bool` | `True` | Whether to batch spans before sending them. |
|
|
146
|
+
| `write_spans_to_console` | `bool` | `False` | Whether to write spans to the console. |
|
|
147
|
+
| `custom_remote_exporter` | `Optional[Exporter]` | `None` | Custom remote exporter. If `None`, a default `LangTraceExporter` will be used. |
|
|
148
|
+
| `api_host` | `Optional[str]` | `https://langtrace.ai/` | The API host for the remote exporter. |
|
|
149
|
+
| `disable_instrumentations` | `Optional[DisableInstrumentations]` | `None` | You can pass an object to disable instrumentation for specific vendors ex: `{'only': ['openai']}` or `{'all_except': ['openai']}`
|
|
150
|
+
|
|
135
151
|
### Additional Customization
|
|
136
152
|
|
|
137
153
|
- `@with_langtrace_root_span` - this decorator is designed to organize and relate different spans, in a hierarchical manner. When you're performing multiple operations that you want to monitor together as a unit, this function helps by establishing a "parent" (`LangtraceRootSpan` or whatever is passed to `name`) span. Then, any calls to the LLM APIs made within the given function (fn) will be considered "children" of this parent span. This setup is especially useful for tracking the performance or behavior of a group of operations collectively, rather than individually.
|
|
@@ -149,7 +165,6 @@ def example():
|
|
|
149
165
|
return response
|
|
150
166
|
```
|
|
151
167
|
|
|
152
|
-
|
|
153
168
|
- `with_additional_attributes` - this function is designed to enhance the traces by adding custom attributes to the current context. These custom attributes provide extra details about the operations being performed, making it easier to analyze and understand their behavior.
|
|
154
169
|
|
|
155
170
|
```python
|
|
@@ -186,7 +201,6 @@ def chat_completion():
|
|
|
186
201
|
|
|
187
202
|
- `get_prompt_from_registry` - this function is designed to fetch the desired prompt from the `Prompt Registry`. You can pass two options for filtering `prompt_version` & `variables`.
|
|
188
203
|
|
|
189
|
-
|
|
190
204
|
```python
|
|
191
205
|
from langtrace_python_sdk import get_prompt_from_registry
|
|
192
206
|
|
|
@@ -18,15 +18,15 @@ classifiers=[
|
|
|
18
18
|
"Operating System :: OS Independent",
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
|
-
'trace-attributes>=
|
|
21
|
+
'trace-attributes>=4.0.2',
|
|
22
22
|
'opentelemetry-api',
|
|
23
23
|
'opentelemetry-sdk',
|
|
24
24
|
'opentelemetry-instrumentation',
|
|
25
25
|
'pinecone-client',
|
|
26
26
|
'tiktoken',
|
|
27
27
|
'opentelemetry-exporter-otlp-proto-http>=1.24.0',
|
|
28
|
-
'opentelemetry-exporter-otlp-proto-grpc>=1.24.0'
|
|
29
|
-
|
|
28
|
+
'opentelemetry-exporter-otlp-proto-grpc>=1.24.0',
|
|
29
|
+
'weaviate-client',
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
requires-python = ">=3.9"
|
|
@@ -35,15 +35,17 @@ requires-python = ">=3.9"
|
|
|
35
35
|
dev = [
|
|
36
36
|
"openai",
|
|
37
37
|
"anthropic",
|
|
38
|
+
"chromadb",
|
|
39
|
+
'qdrant-client',
|
|
38
40
|
"python-dotenv",
|
|
39
41
|
"langchain",
|
|
40
42
|
'langchain-community',
|
|
41
43
|
"langchain-openai",
|
|
42
|
-
"llama-index",
|
|
43
44
|
"langchain-openai",
|
|
44
45
|
"chromadb",
|
|
45
46
|
"cohere",
|
|
46
|
-
|
|
47
|
+
"qdrant_client",
|
|
48
|
+
"weaviate-client",
|
|
47
49
|
]
|
|
48
50
|
|
|
49
51
|
test = [
|
{langtrace_python_sdk-2.0.12 → langtrace_python_sdk-2.1.0}/src/examples/pinecone_example/basic.py
RENAMED
|
@@ -7,7 +7,8 @@ from dotenv import find_dotenv, load_dotenv
|
|
|
7
7
|
from openai import OpenAI
|
|
8
8
|
from pinecone import Pinecone
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
from langtrace_python_sdk import with_langtrace_root_span, send_user_feedback
|
|
11
12
|
|
|
12
13
|
_ = load_dotenv(find_dotenv())
|
|
13
14
|
|
|
@@ -18,7 +19,8 @@ pinecone = Pinecone()
|
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
@with_langtrace_root_span()
|
|
21
|
-
def basic():
|
|
22
|
+
def basic(span_id, trace_id):
|
|
23
|
+
|
|
22
24
|
result = client.embeddings.create(
|
|
23
25
|
model="text-embedding-ada-002",
|
|
24
26
|
input="Some random text string goes here",
|
|
@@ -37,4 +39,7 @@ def basic():
|
|
|
37
39
|
resp = index.query(
|
|
38
40
|
vector=embedding, top_k=1, include_values=False, namespace="test-namespace"
|
|
39
41
|
)
|
|
42
|
+
send_user_feedback(
|
|
43
|
+
{"spanId": span_id, "traceId": trace_id, "userScore": 1, "userId": "123"}
|
|
44
|
+
)
|
|
40
45
|
print(resp)
|