langtrace-python-sdk 2.1.7__tar.gz → 2.1.8__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.7 → langtrace_python_sdk-2.1.8}/PKG-INFO +1 -1
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/langtrace.py +2 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/__init__.py +8 -0
- langtrace_python_sdk-2.1.8/src/langtrace_python_sdk/utils/sdk_version_checker.py +48 -0
- langtrace_python_sdk-2.1.8/src/langtrace_python_sdk/version.py +1 -0
- langtrace_python_sdk-2.1.7/src/langtrace_python_sdk/version.py +0 -1
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/.gitignore +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/LICENSE +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/README.md +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/pyproject.toml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/anthropic_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/anthropic_example/completion.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/chroma_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/chroma_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/chat.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/chat_stream.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/embed.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/rerank.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/tools.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/fastapi_example/basic_route.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/hiveagent_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/langchain_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/langchain_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/langchain_example/groq_example.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/langchain_example/langgraph_example.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/langchain_example/tool.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/llamaindex_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/llamaindex_example/agent.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/llamaindex_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/llamaindex_example/data/abramov.txt +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/async_tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/async_tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/chat_completion.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/embeddings_create.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/function_calling.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/images_generate.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/tool_calling.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/perplexity_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/pinecone_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/pinecone_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/qdrant_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/qdrant_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/weaviate_example/query_text.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/common.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/extensions/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/openai/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/weaviate/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/types/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/llm.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/misc.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/types.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/with_root_span.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/run_example.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/__init__.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/anthropic/conftest.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/anthropic/test_anthropic.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/chroma/conftest.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/chroma/test_chroma.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/cassettes/test_cohere_chat.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/conftest.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/test_cohere_chat.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/test_cohere_embed.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/test_cohere_rerank.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/conftest.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/langchain/cassettes/test_langchain.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/langchain/conftest.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/langchain/test_langchain.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/conftest.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/test_chat_completion.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/test_embeddings.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/test_image_generation.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/pinecone/conftest.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/pinecone/test_pinecone.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/qdrant/conftest.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/qdrant/test_qdrant.py +0 -0
- {langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/utils.py +0 -0
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/langtrace.py
RENAMED
|
@@ -45,6 +45,7 @@ from langtrace_python_sdk.instrumentation import (
|
|
|
45
45
|
)
|
|
46
46
|
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
|
|
47
47
|
from colorama import Fore
|
|
48
|
+
from langtrace_python_sdk.utils import check_if_sdk_is_outdated
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
def init(
|
|
@@ -55,6 +56,7 @@ def init(
|
|
|
55
56
|
api_host: Optional[str] = None,
|
|
56
57
|
disable_instrumentations: Optional[DisableInstrumentations] = None,
|
|
57
58
|
):
|
|
59
|
+
check_if_sdk_is_outdated()
|
|
58
60
|
print(Fore.GREEN + "Initializing Langtrace SDK.." + Fore.RESET)
|
|
59
61
|
provider = TracerProvider(resource=Resource.create({"service.name": sys.argv[0]}))
|
|
60
62
|
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/__init__.py
RENAMED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
from .sdk_version_checker import SDKVersionChecker
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
def set_span_attribute(span, name, value):
|
|
2
5
|
if value is not None:
|
|
3
6
|
if value != "":
|
|
4
7
|
span.set_attribute(name, value)
|
|
5
8
|
return
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def check_if_sdk_is_outdated():
|
|
12
|
+
SDKVersionChecker().check()
|
|
13
|
+
return
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from importlib.metadata import version
|
|
2
|
+
import time
|
|
3
|
+
import requests
|
|
4
|
+
from colorama import Fore
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class SDKVersionChecker:
|
|
8
|
+
_cache: None
|
|
9
|
+
_cache_duration: int
|
|
10
|
+
_current_version: str
|
|
11
|
+
_latest_version: str
|
|
12
|
+
|
|
13
|
+
def __init__(self):
|
|
14
|
+
self._cache = {"timestamp": 0, "latest_version": None}
|
|
15
|
+
self._cache_duration = 3600 # Cache for 1 hour
|
|
16
|
+
self._current_version = version("langtrace_python_sdk")
|
|
17
|
+
|
|
18
|
+
def fetch_latest(self):
|
|
19
|
+
current_time = time.time()
|
|
20
|
+
if (
|
|
21
|
+
current_time - self._cache["timestamp"] < self._cache_duration
|
|
22
|
+
and self._cache["latest_version"]
|
|
23
|
+
):
|
|
24
|
+
return self._cache["latest_version"]
|
|
25
|
+
|
|
26
|
+
response = requests.get(
|
|
27
|
+
"https://api.github.com/repos/Scale3-Labs/langtrace-python-sdk/releases/latest",
|
|
28
|
+
timeout=20,
|
|
29
|
+
)
|
|
30
|
+
response.raise_for_status()
|
|
31
|
+
latest_version = response.json()["tag_name"]
|
|
32
|
+
self._cache.update(
|
|
33
|
+
{"timestamp": current_time, "latest_version": latest_version}
|
|
34
|
+
)
|
|
35
|
+
self._latest_version = latest_version
|
|
36
|
+
return latest_version
|
|
37
|
+
|
|
38
|
+
def is_outdated(self):
|
|
39
|
+
latest_version = self.fetch_latest()
|
|
40
|
+
return self._current_version < latest_version
|
|
41
|
+
|
|
42
|
+
def check(self):
|
|
43
|
+
if self.is_outdated():
|
|
44
|
+
print(
|
|
45
|
+
Fore.YELLOW
|
|
46
|
+
+ f"Warning: Your Langtrace SDK version {self._current_version} is outdated. Please upgrade to {self._latest_version}."
|
|
47
|
+
+ Fore.RESET
|
|
48
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.8"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/anthropic_example/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/chroma_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/chroma_example/basic.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/chat.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/chat_stream.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/embed.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/rerank.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/cohere_example/tools.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/hiveagent_example/basic.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/langchain_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/langchain_example/basic.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/langchain_example/tool.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/llamaindex_example/agent.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/llamaindex_example/basic.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/openai_example/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/perplexity_example/basic.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/pinecone_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/pinecone_example/basic.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/qdrant_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/examples/qdrant_example/basic.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/types/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/llm.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/misc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/langtrace_python_sdk/utils/types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/anthropic/test_anthropic.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/test_cohere_chat.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/test_cohere_embed.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/cohere/test_cohere_rerank.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/langchain/test_langchain.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/test_chat_completion.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/test_embeddings.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/openai/test_image_generation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.1.7 → langtrace_python_sdk-2.1.8}/src/tests/pinecone/test_pinecone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|