langtrace-python-sdk 2.1.13__tar.gz → 2.1.14__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.1.13 → langtrace_python_sdk-2.1.14}/PKG-INFO +8 -7
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/README.md +6 -5
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/pyproject.toml +1 -1
- langtrace_python_sdk-2.1.14/src/examples/__init__.py +1 -0
- langtrace_python_sdk-2.1.14/src/examples/anthropic_example/__init__.py +8 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/anthropic_example/completion.py +1 -2
- langtrace_python_sdk-2.1.14/src/examples/chroma_example/__init__.py +8 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/chroma_example/basic.py +1 -1
- langtrace_python_sdk-2.1.14/src/examples/cohere_example/__init__.py +17 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/chat.py +1 -1
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/chat_stream.py +1 -1
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/embed.py +1 -1
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/rerank.py +1 -1
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/tools.py +1 -1
- langtrace_python_sdk-2.1.14/src/examples/fastapi_example/__init__.py +6 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/fastapi_example/basic_route.py +2 -0
- langtrace_python_sdk-2.1.14/src/examples/langchain_example/__init__.py +10 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/basic.py +3 -3
- langtrace_python_sdk-2.1.14/src/examples/llamaindex_example/__init__.py +11 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/llamaindex_example/agent.py +4 -3
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/llamaindex_example/basic.py +2 -2
- langtrace_python_sdk-2.1.14/src/examples/openai_example/__init__.py +21 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/async_tool_calling_nonstreaming.py +3 -3
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/async_tool_calling_streaming.py +2 -1
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/chat_completion.py +3 -3
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/embeddings_create.py +2 -2
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/function_calling.py +3 -2
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/images_edit.py +2 -2
- langtrace_python_sdk-2.1.14/src/examples/pinecone_example/__init__.py +9 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/pinecone_example/basic.py +7 -2
- langtrace_python_sdk-2.1.14/src/examples/qdrant_example/__init__.py +8 -0
- langtrace_python_sdk-2.1.14/src/examples/weaviate_example/__init__.py +26 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/weaviate_example/query_text.py +12 -8
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/__init__.py +6 -1
- langtrace_python_sdk-2.1.14/src/langtrace_python_sdk/version.py +1 -0
- langtrace_python_sdk-2.1.14/src/run_example.py +76 -0
- langtrace_python_sdk-2.1.13/src/examples/chroma_example/__init__.py +0 -1
- langtrace_python_sdk-2.1.13/src/examples/langchain_example/__init__.py +0 -0
- langtrace_python_sdk-2.1.13/src/examples/llamaindex_example/__init__.py +0 -0
- langtrace_python_sdk-2.1.13/src/examples/openai_example/__init__.py +0 -0
- langtrace_python_sdk-2.1.13/src/examples/pinecone_example/__init__.py +0 -0
- langtrace_python_sdk-2.1.13/src/examples/qdrant_example/__init__.py +0 -0
- langtrace_python_sdk-2.1.13/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
- langtrace_python_sdk-2.1.13/src/langtrace_python_sdk/extensions/__init__.py +0 -0
- langtrace_python_sdk-2.1.13/src/langtrace_python_sdk/version.py +0 -1
- langtrace_python_sdk-2.1.13/src/run_example.py +0 -56
- langtrace_python_sdk-2.1.13/src/tests/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/.gitignore +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/LICENSE +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/hiveagent_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/groq_example.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/langgraph_example.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/tool.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/llamaindex_example/data/abramov.txt +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/images_generate.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/resources/lounge_flamingo.png +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/resources/mask.png +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/tool_calling.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/perplexity_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/qdrant_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.1.13/src/examples → langtrace_python_sdk-2.1.14/src/langtrace_python_sdk/constants/instrumentation}/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/common.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +0 -0
- {langtrace_python_sdk-2.1.13/src/examples/anthropic_example → langtrace_python_sdk-2.1.14/src/langtrace_python_sdk/extensions}/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/openai/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/weaviate/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/langtrace.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/types/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/llm.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/misc.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/sdk_version_checker.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/types.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/with_root_span.py +0 -0
- {langtrace_python_sdk-2.1.13/src/examples/cohere_example → langtrace_python_sdk-2.1.14/src/tests}/__init__.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/conftest.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/test_anthropic.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/chroma/conftest.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/chroma/test_chroma.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/cassettes/test_cohere_chat.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/conftest.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/test_cohere_chat.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/test_cohere_embed.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/test_cohere_rerank.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/conftest.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/langchain/cassettes/test_langchain.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/langchain/conftest.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/langchain/test_langchain.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/conftest.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/test_chat_completion.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/test_embeddings.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/test_image_generation.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/pinecone/conftest.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/pinecone/test_pinecone.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/qdrant/conftest.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/qdrant/test_qdrant.py +0 -0
- {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/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.1.
|
|
3
|
+
Version: 2.1.14
|
|
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>
|
|
@@ -19,7 +19,7 @@ Requires-Dist: opentelemetry-instrumentation>=0.46b0
|
|
|
19
19
|
Requires-Dist: opentelemetry-sdk>=1.25.0
|
|
20
20
|
Requires-Dist: sqlalchemy
|
|
21
21
|
Requires-Dist: tiktoken>=0.1.1
|
|
22
|
-
Requires-Dist: trace-attributes
|
|
22
|
+
Requires-Dist: trace-attributes<6.0.0,>=5.0.0
|
|
23
23
|
Provides-Extra: dev
|
|
24
24
|
Requires-Dist: anthropic; extra == 'dev'
|
|
25
25
|
Requires-Dist: chromadb; extra == 'dev'
|
|
@@ -193,7 +193,7 @@ langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
|
|
|
193
193
|
- `@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.
|
|
194
194
|
|
|
195
195
|
```python
|
|
196
|
-
from langtrace_python_sdk
|
|
196
|
+
from langtrace_python_sdk import with_langtrace_root_span
|
|
197
197
|
|
|
198
198
|
@with_langtrace_root_span()
|
|
199
199
|
def example():
|
|
@@ -208,10 +208,8 @@ def example():
|
|
|
208
208
|
- `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.
|
|
209
209
|
|
|
210
210
|
```python
|
|
211
|
-
from langtrace_python_sdk
|
|
212
|
-
|
|
213
|
-
with_additional_attributes,
|
|
214
|
-
)
|
|
211
|
+
from langtrace_python_sdk import with_langtrace_root_span, with_additional_attributes
|
|
212
|
+
|
|
215
213
|
|
|
216
214
|
@with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
|
|
217
215
|
def api_call1():
|
|
@@ -277,6 +275,9 @@ Langtrace automatically captures traces from the following vendors:
|
|
|
277
275
|
|
|
278
276
|
We welcome contributions to this project. To get started, fork this repository and start developing. To get involved, join our [Discord](https://discord.langtrace.ai) workspace.
|
|
279
277
|
|
|
278
|
+
If you want to run any of the examples go to `run_example.py` file, you will find `ENABLED_EXAMPLES`. choose the example you want to run and just toggle the flag to `True` and run the file using `python src/run_example.py`
|
|
279
|
+
|
|
280
|
+
|
|
280
281
|
---
|
|
281
282
|
|
|
282
283
|
## Security
|
|
@@ -153,7 +153,7 @@ langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
|
|
|
153
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.
|
|
154
154
|
|
|
155
155
|
```python
|
|
156
|
-
from langtrace_python_sdk
|
|
156
|
+
from langtrace_python_sdk import with_langtrace_root_span
|
|
157
157
|
|
|
158
158
|
@with_langtrace_root_span()
|
|
159
159
|
def example():
|
|
@@ -168,10 +168,8 @@ def example():
|
|
|
168
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.
|
|
169
169
|
|
|
170
170
|
```python
|
|
171
|
-
from langtrace_python_sdk
|
|
172
|
-
|
|
173
|
-
with_additional_attributes,
|
|
174
|
-
)
|
|
171
|
+
from langtrace_python_sdk import with_langtrace_root_span, with_additional_attributes
|
|
172
|
+
|
|
175
173
|
|
|
176
174
|
@with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
|
|
177
175
|
def api_call1():
|
|
@@ -237,6 +235,9 @@ Langtrace automatically captures traces from the following vendors:
|
|
|
237
235
|
|
|
238
236
|
We welcome contributions to this project. To get started, fork this repository and start developing. To get involved, join our [Discord](https://discord.langtrace.ai) workspace.
|
|
239
237
|
|
|
238
|
+
If you want to run any of the examples go to `run_example.py` file, you will find `ENABLED_EXAMPLES`. choose the example you want to run and just toggle the flag to `True` and run the file using `python src/run_example.py`
|
|
239
|
+
|
|
240
|
+
|
|
240
241
|
---
|
|
241
242
|
|
|
242
243
|
## Security
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -7,12 +7,11 @@ from langtrace_python_sdk import langtrace, with_langtrace_root_span
|
|
|
7
7
|
|
|
8
8
|
_ = load_dotenv(find_dotenv())
|
|
9
9
|
|
|
10
|
-
langtrace.init(
|
|
10
|
+
langtrace.init()
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
@with_langtrace_root_span("messages_create")
|
|
14
14
|
def messages_create():
|
|
15
|
-
|
|
16
15
|
client = anthropic.Anthropic()
|
|
17
16
|
|
|
18
17
|
message = client.messages.create(
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from examples.cohere_example.chat import chat_comp
|
|
2
|
+
from examples.cohere_example.chat_stream import chat_stream
|
|
3
|
+
from examples.cohere_example.tools import tool_calling
|
|
4
|
+
from examples.cohere_example.embed import embed
|
|
5
|
+
from examples.cohere_example.rerank import rerank
|
|
6
|
+
from langtrace_python_sdk import with_langtrace_root_span
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CohereRunner:
|
|
10
|
+
|
|
11
|
+
@with_langtrace_root_span("Cohere")
|
|
12
|
+
def run(self):
|
|
13
|
+
chat_comp()
|
|
14
|
+
chat_stream()
|
|
15
|
+
tool_calling()
|
|
16
|
+
embed()
|
|
17
|
+
rerank()
|
|
@@ -7,7 +7,9 @@ from langchain_openai import ChatOpenAI, OpenAIEmbeddings
|
|
|
7
7
|
from openai import OpenAI
|
|
8
8
|
|
|
9
9
|
from langtrace_python_sdk import langtrace
|
|
10
|
+
from dotenv import load_dotenv
|
|
10
11
|
|
|
12
|
+
load_dotenv()
|
|
11
13
|
langtrace.init(write_spans_to_console=True)
|
|
12
14
|
app = FastAPI()
|
|
13
15
|
client = OpenAI()
|
{langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/basic.py
RENAMED
|
@@ -18,7 +18,7 @@ _ = load_dotenv(find_dotenv())
|
|
|
18
18
|
langtrace.init()
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
@with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
|
|
21
|
+
# @with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
|
|
22
22
|
def api_call_1():
|
|
23
23
|
llm = ChatOpenAI()
|
|
24
24
|
prompt = ChatPromptTemplate.from_messages(
|
|
@@ -33,7 +33,7 @@ def api_call_1():
|
|
|
33
33
|
print(res)
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
@with_additional_attributes({"user.id": "37373", "user.feedback.rating": 1})
|
|
36
|
+
# @with_additional_attributes({"user.id": "37373", "user.feedback.rating": 1})
|
|
37
37
|
def api_call_2():
|
|
38
38
|
llm = ChatOpenAI()
|
|
39
39
|
prompt = ChatPromptTemplate.from_messages(
|
|
@@ -49,7 +49,7 @@ def api_call_2():
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
@with_langtrace_root_span()
|
|
52
|
-
def
|
|
52
|
+
def basic_app():
|
|
53
53
|
api_call_1()
|
|
54
54
|
api_call_2()
|
|
55
55
|
|
{langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/llamaindex_example/agent.py
RENAMED
|
@@ -12,7 +12,7 @@ import nest_asyncio
|
|
|
12
12
|
|
|
13
13
|
nest_asyncio.apply()
|
|
14
14
|
|
|
15
|
-
langtrace.init(write_spans_to_console=
|
|
15
|
+
langtrace.init(write_spans_to_console=False)
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def multiply(a: int, b: int) -> int:
|
|
@@ -82,5 +82,6 @@ class YourOpenAIAgent:
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
# agent = YourOpenAIAgent(tools=[multiply_tool, add_tool])
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
def main():
|
|
86
|
+
llm = OpenAI(model="gpt-3.5-turbo-0613")
|
|
87
|
+
agent = OpenAIAgent.from_tools([multiply_tool, add_tool], llm=llm, verbose=True)
|
{langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/llamaindex_example/basic.py
RENAMED
|
@@ -7,11 +7,11 @@ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
|
|
|
7
7
|
_ = load_dotenv(find_dotenv())
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
langtrace.init(write_spans_to_console=
|
|
10
|
+
langtrace.init(write_spans_to_console=False)
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
@with_langtrace_root_span()
|
|
14
|
-
def
|
|
14
|
+
def basic_app():
|
|
15
15
|
documents = SimpleDirectoryReader(
|
|
16
16
|
"src/examples/llamaindex_example/data"
|
|
17
17
|
).load_data()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from langtrace_python_sdk import with_langtrace_root_span
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class OpenAIRunner:
|
|
5
|
+
@with_langtrace_root_span("OpenAI")
|
|
6
|
+
def run(self):
|
|
7
|
+
import asyncio
|
|
8
|
+
from .async_tool_calling_nonstreaming import run_conversation
|
|
9
|
+
from .async_tool_calling_streaming import (
|
|
10
|
+
run_conversation as run_conversation_streaming,
|
|
11
|
+
)
|
|
12
|
+
from .chat_completion import chat_completion as chat_completion_example
|
|
13
|
+
from .embeddings_create import embeddings_create as embeddings_create_example
|
|
14
|
+
from .function_calling import function_calling as function_example
|
|
15
|
+
from .images_edit import image_edit
|
|
16
|
+
|
|
17
|
+
asyncio.run(run_conversation())
|
|
18
|
+
asyncio.run(run_conversation_streaming())
|
|
19
|
+
chat_completion_example()
|
|
20
|
+
embeddings_create_example()
|
|
21
|
+
function_example()
|
|
@@ -3,13 +3,12 @@ import json
|
|
|
3
3
|
from dotenv import find_dotenv, load_dotenv
|
|
4
4
|
from openai import AsyncOpenAI
|
|
5
5
|
|
|
6
|
-
from langtrace_python_sdk import langtrace
|
|
6
|
+
from langtrace_python_sdk import langtrace, with_langtrace_root_span
|
|
7
7
|
|
|
8
|
-
# from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
|
|
9
8
|
|
|
10
9
|
_ = load_dotenv(find_dotenv())
|
|
11
10
|
|
|
12
|
-
langtrace.init(
|
|
11
|
+
langtrace.init()
|
|
13
12
|
|
|
14
13
|
client = AsyncOpenAI()
|
|
15
14
|
|
|
@@ -30,6 +29,7 @@ def get_current_weather(location, unit="fahrenheit"):
|
|
|
30
29
|
return json.dumps({"location": location, "temperature": "unknown"})
|
|
31
30
|
|
|
32
31
|
|
|
32
|
+
@with_langtrace_root_span("Run Conversation")
|
|
33
33
|
async def run_conversation():
|
|
34
34
|
# Step 1: send the conversation and available functions to the model
|
|
35
35
|
messages = [
|
|
@@ -3,7 +3,7 @@ import json
|
|
|
3
3
|
from dotenv import find_dotenv, load_dotenv
|
|
4
4
|
from openai import AsyncOpenAI
|
|
5
5
|
|
|
6
|
-
from langtrace_python_sdk import langtrace
|
|
6
|
+
from langtrace_python_sdk import langtrace, with_langtrace_root_span
|
|
7
7
|
|
|
8
8
|
# from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
|
|
9
9
|
|
|
@@ -42,6 +42,7 @@ def get_current_time(location):
|
|
|
42
42
|
return json.dumps({"location": location, "time": "unknown"})
|
|
43
43
|
|
|
44
44
|
|
|
45
|
+
@with_langtrace_root_span("Run Conversation Streaming")
|
|
45
46
|
async def run_conversation():
|
|
46
47
|
# Step 1: send the conversation and available functions to the model
|
|
47
48
|
messages = [
|
|
@@ -9,11 +9,11 @@ from langtrace_python_sdk.utils.with_root_span import (
|
|
|
9
9
|
|
|
10
10
|
_ = load_dotenv(find_dotenv())
|
|
11
11
|
|
|
12
|
-
langtrace.init(write_spans_to_console=
|
|
12
|
+
langtrace.init(write_spans_to_console=False)
|
|
13
13
|
client = OpenAI()
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
@with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
|
|
17
17
|
def api():
|
|
18
18
|
response = client.chat.completions.create(
|
|
19
19
|
model="gpt-4",
|
|
@@ -27,7 +27,7 @@ def api():
|
|
|
27
27
|
return response
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
@with_langtrace_root_span("Chat Completion")
|
|
31
31
|
def chat_completion():
|
|
32
32
|
response = api()
|
|
33
33
|
# print(response)
|
|
@@ -6,12 +6,12 @@ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
|
|
|
6
6
|
|
|
7
7
|
_ = load_dotenv(find_dotenv())
|
|
8
8
|
|
|
9
|
-
langtrace.init(write_spans_to_console=
|
|
9
|
+
langtrace.init(write_spans_to_console=False)
|
|
10
10
|
|
|
11
11
|
client = OpenAI()
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@with_langtrace_root_span()
|
|
14
|
+
@with_langtrace_root_span("Embeddings Create")
|
|
15
15
|
def embeddings_create():
|
|
16
16
|
result = client.embeddings.create(
|
|
17
17
|
model="text-embedding-ada-002",
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
from dotenv import find_dotenv, load_dotenv
|
|
4
4
|
from openai import OpenAI
|
|
5
5
|
|
|
6
|
-
from langtrace_python_sdk import langtrace
|
|
6
|
+
from langtrace_python_sdk import langtrace, with_langtrace_root_span
|
|
7
7
|
|
|
8
8
|
_ = load_dotenv(find_dotenv())
|
|
9
9
|
|
|
10
|
-
langtrace.init(write_spans_to_console=
|
|
10
|
+
langtrace.init(write_spans_to_console=False)
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
client = OpenAI()
|
|
@@ -34,6 +34,7 @@ student_custom_functions = [
|
|
|
34
34
|
]
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
@with_langtrace_root_span("Function Calling")
|
|
37
38
|
def function_calling():
|
|
38
39
|
response = client.chat.completions.create(
|
|
39
40
|
model="gpt-3.5-turbo",
|
|
@@ -8,7 +8,7 @@ from langtrace_python_sdk import langtrace
|
|
|
8
8
|
|
|
9
9
|
_ = load_dotenv(find_dotenv())
|
|
10
10
|
|
|
11
|
-
langtrace.init(write_spans_to_console=
|
|
11
|
+
langtrace.init(write_spans_to_console=False)
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
client = OpenAI()
|
|
@@ -36,5 +36,5 @@ def image_edit():
|
|
|
36
36
|
print(response)
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
image_edit()
|
|
39
|
+
# image_edit()
|
|
40
40
|
# convert_to_rgba()
|
{langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/pinecone_example/basic.py
RENAMED
|
@@ -6,7 +6,11 @@ from dotenv import find_dotenv, load_dotenv
|
|
|
6
6
|
from openai import OpenAI
|
|
7
7
|
from pinecone import Pinecone, ServerlessSpec
|
|
8
8
|
|
|
9
|
-
from langtrace_python_sdk import
|
|
9
|
+
from langtrace_python_sdk import (
|
|
10
|
+
langtrace,
|
|
11
|
+
with_langtrace_root_span,
|
|
12
|
+
with_additional_attributes,
|
|
13
|
+
)
|
|
10
14
|
from langtrace_python_sdk.utils.with_root_span import SendUserFeedback
|
|
11
15
|
|
|
12
16
|
_ = load_dotenv(find_dotenv())
|
|
@@ -28,7 +32,8 @@ def create_index():
|
|
|
28
32
|
)
|
|
29
33
|
|
|
30
34
|
|
|
31
|
-
@
|
|
35
|
+
@with_additional_attributes({"db.embedding_model": "text-embedding-ada-002"})
|
|
36
|
+
@with_langtrace_root_span("Pinecone Basic")
|
|
32
37
|
def basic(span_id=None, trace_id=None):
|
|
33
38
|
|
|
34
39
|
result = client.embeddings.create(
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from .query_text import (
|
|
2
|
+
create,
|
|
3
|
+
insert,
|
|
4
|
+
query_data_bm25,
|
|
5
|
+
query_fetch_object_by_id,
|
|
6
|
+
query_fetch_objects,
|
|
7
|
+
query_hybrid,
|
|
8
|
+
query_near_object,
|
|
9
|
+
query_data_near_text,
|
|
10
|
+
query_data_near_vector,
|
|
11
|
+
)
|
|
12
|
+
from langtrace_python_sdk import with_langtrace_root_span
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class WeaviateRunner:
|
|
16
|
+
@with_langtrace_root_span("Weaviate")
|
|
17
|
+
def run(self):
|
|
18
|
+
create()
|
|
19
|
+
insert()
|
|
20
|
+
query_data_bm25()
|
|
21
|
+
# query_fetch_object_by_id()
|
|
22
|
+
# query_fetch_objects()
|
|
23
|
+
# query_hybrid()
|
|
24
|
+
# query_near_object()
|
|
25
|
+
# query_data_near_text()
|
|
26
|
+
# query_data_near_vector()
|
|
@@ -21,7 +21,9 @@ from weaviate.collections.classes.grpc import Move
|
|
|
21
21
|
|
|
22
22
|
import langtrace_python_sdk.langtrace as langtrace
|
|
23
23
|
from langtrace_python_sdk import with_langtrace_root_span
|
|
24
|
+
from dotenv import load_dotenv
|
|
24
25
|
|
|
26
|
+
load_dotenv()
|
|
25
27
|
# Set these environment variables
|
|
26
28
|
WCS_DEMO_URL = os.environ["WCS_DEMO_URL"]
|
|
27
29
|
WCS_DEMO_RO_KEY = os.environ["WCS_DEMO_RO_KEY"]
|
|
@@ -37,17 +39,19 @@ client = weaviate.connect_to_wcs(
|
|
|
37
39
|
langtrace.init()
|
|
38
40
|
|
|
39
41
|
|
|
40
|
-
@with_langtrace_root_span()
|
|
42
|
+
@with_langtrace_root_span("create")
|
|
41
43
|
def create():
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
if not client.collections.get("Question"):
|
|
45
|
+
questions = client.collections.create(
|
|
46
|
+
name="Question",
|
|
47
|
+
# Set the vectorizer to "text2vec-openai" to use the OpenAI API for vector-related operations
|
|
48
|
+
vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_openai(),
|
|
49
|
+
# Ensure the `generative-openai` module is used for generative queries
|
|
50
|
+
generative_config=wvc.config.Configure.Generative.openai(),
|
|
51
|
+
)
|
|
49
52
|
|
|
50
53
|
|
|
54
|
+
@with_langtrace_root_span("insert")
|
|
51
55
|
def insert():
|
|
52
56
|
resp = requests.get(
|
|
53
57
|
"https://raw.githubusercontent.com/weaviate-tutorials/quickstart/main/data/jeopardy_tiny.json"
|
{langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/__init__.py
RENAMED
|
@@ -15,13 +15,18 @@ limitations under the License.
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
from langtrace_python_sdk import langtrace
|
|
18
|
-
from langtrace_python_sdk.utils.with_root_span import
|
|
18
|
+
from langtrace_python_sdk.utils.with_root_span import (
|
|
19
|
+
with_langtrace_root_span,
|
|
20
|
+
with_additional_attributes,
|
|
21
|
+
)
|
|
22
|
+
|
|
19
23
|
from langtrace_python_sdk.utils.prompt_registry import get_prompt_from_registry
|
|
20
24
|
from langtrace_python_sdk.utils.with_root_span import SendUserFeedback
|
|
21
25
|
|
|
22
26
|
__all__ = [
|
|
23
27
|
"langtrace",
|
|
24
28
|
"with_langtrace_root_span",
|
|
29
|
+
"with_additional_attributes",
|
|
25
30
|
"get_prompt_from_registry",
|
|
26
31
|
"SendUserFeedback",
|
|
27
32
|
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.14"
|