langtrace-python-sdk 3.8.14__tar.gz → 3.8.17__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-3.8.14 → langtrace_python_sdk-3.8.17}/PKG-INFO +1 -1
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/pyproject.toml +3 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/QA_basic.py +2 -2
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/QA_basic_with_chain_of_thought.py +2 -2
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/QA_basic_with_signature.py +2 -2
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/QA_multi_step_with_chain_of_thought.py +2 -2
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/math_problems_cot.py +2 -2
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/math_problems_cot_parallel.py +2 -2
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/program_of_thought_basic.py +2 -2
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/react.py +2 -2
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +4 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +7 -1
- langtrace_python_sdk-3.8.17/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +280 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cleanlab/patch.py +4 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/dspy/instrumentation.py +0 -5
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/dspy/patch.py +1 -1
- langtrace_python_sdk-3.8.17/src/langtrace_python_sdk/version.py +1 -0
- langtrace_python_sdk-3.8.14/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -133
- langtrace_python_sdk-3.8.14/src/langtrace_python_sdk/version.py +0 -1
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/.gitignore +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/LICENSE +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/README.md +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/anthropic_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/anthropic_example/completion.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/autogen_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/autogen_example/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/awsbedrock_examples/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/awsbedrock_examples/converse.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/azureopenai_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/azureopenai_example/completion.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cerebras_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cerebras_example/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/chroma_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/chroma_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cleanlab_example/simple.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/chat.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/chat_stream.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/chat_streamv2.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/chatv2.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/embed.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/rerank.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/rerankv2.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/tools.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/instagram_post/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/instagram_post/agents.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/instagram_post/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/instagram_post/tasks.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/instagram_post/tools/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/instagram_post/tools/browser_tools.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/simple_agent/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/simple_agent/agents.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/simple_agent/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/simple_agent/tasks.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/trip_planner/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/trip_planner/agents.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/trip_planner/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/trip_planner/tasks.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/trip_planner/tools/calculator.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/crewai_example/trip_planner/tools/search_tools.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/optimizers/bootstrap_fewshot.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/quiz_gen.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/embedchain_example/simple.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/fastapi_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/fastapi_example/basic_route.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/gemini_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/gemini_example/function_tools.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/gemini_example/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/google_genai_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/google_genai_example/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/graphlit_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/graphlit_example/conversation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/hiveagent_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/inspect_ai_example/basic_eval.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langchain_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langchain_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langchain_example/groq_example.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langchain_example/langchain_google_example.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langchain_example/langgraph_example.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langchain_example/langgraph_example_tools.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langchain_example/sagemaker.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langchain_example/tool.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/langgraph_example/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/litellm_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/litellm_example/config.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/litellm_example/proxy_basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/llamaindex_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/llamaindex_example/agent.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/llamaindex_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/llamaindex_example/data/abramov.txt +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/milvus_example/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/mistral_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/mistral_example/complete.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/mistral_example/complete_async.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/mistral_example/embeddings.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/mongo_vector_search_example/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/neo4j_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/neo4j_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/neo4j_graphrag_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/neo4j_graphrag_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/neo4j_graphrag_example/data/abramov.pdf +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/ollama_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/ollama_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/async_tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/async_tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/chat_completion.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/chat_completion_tool_choice.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/embeddings_create.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/function_calling.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/images_edit.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/images_generate.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/resources/lounge_flamingo.png +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/resources/mask.png +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/send_user_feedback.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/tool_calling.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/openai_example/tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/otlp_example/otlp_basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/otlp_example/otlp_with_langtrace.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/perplexity_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/phidata_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/phidata_example/agent.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/pinecone_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/pinecone_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/qdrant_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/qdrant_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/routellm_example/basic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/vertexai_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/vertexai_example/main.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/weaviate_example/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/weaviate_example/query_text.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/aws_bedrock.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/common.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/embedchain.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/gemini.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/litellm.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/milvus.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/mistral.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/neo4j.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/ollama.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/pymongo.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/vertexai.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/extensions/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/extensions/langtrace_filesystem.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/agno/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/agno/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/agno/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/anthropic/types.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/autogen/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/autogen/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/autogen/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/aws_bedrock/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/aws_bedrock/bedrock_streaming_wrapper.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/aws_bedrock/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/aws_bedrock/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/aws_bedrock/stream_body_wrapper.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cerebras/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cerebras/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cerebras/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cleanlab/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cleanlab/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/crewai/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/crewai/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/crewai/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/crewai_tools/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/crewai_tools/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/crewai_tools/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/dspy/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/embedchain/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/embedchain/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/embedchain/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/gemini/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/gemini/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/gemini/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/google_genai/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/google_genai/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/google_genai/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/graphlit/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/graphlit/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/graphlit/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/litellm/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/litellm/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/litellm/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/litellm/types.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/milvus/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/milvus/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/milvus/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/mistral/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/mistral/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/mistral/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/neo4j/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/neo4j/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/neo4j/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/neo4j_graphrag/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/neo4j_graphrag/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/neo4j_graphrag/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/ollama/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/ollama/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/ollama/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/openai/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/openai/types.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/openai_agents/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/openai_agents/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/openai_agents/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/phidata/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/phidata/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/phidata/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/pymongo/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/pymongo/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/pymongo/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/vertexai/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/vertexai/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/vertexai/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/weaviate/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/langtrace.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/types/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/langtrace_sampler.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/llm.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/misc.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/sdk_version_checker.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/types.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/langtrace_python_sdk/utils/with_root_span.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/run_example.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/__init__.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/anthropic/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/anthropic/test_anthropic.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/chroma/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/chroma/test_chroma.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/cohere/cassettes/test_cohere_chat.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/cohere/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/cohere/test_cohere_chat.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/cohere/test_cohere_embed.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/cohere/test_cohere_rerank.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/groq/cassettes/test_async_chat_completion.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/groq/cassettes/test_async_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/groq/cassettes/test_chat_completion.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/groq/cassettes/test_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/groq/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/groq/test_groq.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/langchain/cassettes/test_langchain.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/langchain/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/langchain/test_langchain.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/cassettes/test_embeddings_base_url.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/test_chat_completion.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/test_embeddings.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/openai/test_image_generation.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/pinecone/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/pinecone/test_pinecone.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/qdrant/conftest.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/qdrant/test_qdrant.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/test_session_id.py +0 -0
- {langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/tests/utils.py +0 -0
@@ -81,6 +81,9 @@ include = ["/src"]
|
|
81
81
|
[tool.hatch.build.targets.wheel]
|
82
82
|
packages = ["src/langtrace_python_sdk", "src/examples", "src/tests"]
|
83
83
|
|
84
|
+
[tool.hatch.source]
|
85
|
+
url = "https://langtrace.gateway.scarf.sh/simple/"
|
86
|
+
|
84
87
|
[project.entry-points."fsspec.specs"]
|
85
88
|
langtracefs = "langtrace_python_sdk:LangTraceFileSystem"
|
86
89
|
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/QA_basic.py
RENAMED
@@ -8,8 +8,8 @@ langtrace.init(disable_instrumentations={"all_except": ["dspy", "anthropic"]})
|
|
8
8
|
|
9
9
|
# configure the language model to be used by dspy
|
10
10
|
|
11
|
-
|
12
|
-
dspy.
|
11
|
+
lm = dspy.LM('claude-3-opus-20240229')
|
12
|
+
dspy.configure(lm=lm)
|
13
13
|
|
14
14
|
# create a prompt format that says that the llm will take a question and give back an answer
|
15
15
|
predict = dspy.Predict("question -> answer")
|
@@ -7,8 +7,8 @@ load_dotenv()
|
|
7
7
|
langtrace.init(disable_instrumentations={"all_except": ["dspy", "anthropic"]})
|
8
8
|
|
9
9
|
# configure the language model to be used by dspy
|
10
|
-
|
11
|
-
dspy.
|
10
|
+
lm = dspy.LM('claude-3-opus-20240229')
|
11
|
+
dspy.configure(lm=lm)
|
12
12
|
|
13
13
|
|
14
14
|
# create a signature for basic question answering
|
@@ -7,8 +7,8 @@ load_dotenv()
|
|
7
7
|
langtrace.init(disable_instrumentations={"all_except": ["dspy", "anthropic"]})
|
8
8
|
|
9
9
|
# configure the language model to be used by dspy
|
10
|
-
|
11
|
-
dspy.
|
10
|
+
lm = dspy.LM('claude-3-opus-20240229')
|
11
|
+
dspy.configure(lm=lm)
|
12
12
|
|
13
13
|
|
14
14
|
# create a signature for basic question answering
|
@@ -7,8 +7,8 @@ load_dotenv()
|
|
7
7
|
langtrace.init(disable_instrumentations={"all_except": ["dspy", "anthropic"]})
|
8
8
|
|
9
9
|
# configure the language model to be used by dspy
|
10
|
-
|
11
|
-
dspy.
|
10
|
+
lm = dspy.LM('claude-3-opus-20240229')
|
11
|
+
dspy.configure(lm=lm)
|
12
12
|
|
13
13
|
|
14
14
|
# create a signature for basic question answering
|
@@ -7,8 +7,8 @@ from langtrace_python_sdk import langtrace, with_langtrace_root_span
|
|
7
7
|
|
8
8
|
langtrace.init()
|
9
9
|
|
10
|
-
|
11
|
-
dspy.
|
10
|
+
lm = dspy.LM('gpt-3.5-turbo')
|
11
|
+
dspy.configure(lm=lm)
|
12
12
|
|
13
13
|
# Load math questions from the GSM8K dataset
|
14
14
|
gsm8k = GSM8K()
|
@@ -9,8 +9,8 @@ from langtrace_python_sdk import langtrace, with_langtrace_root_span, inject_add
|
|
9
9
|
|
10
10
|
langtrace.init()
|
11
11
|
|
12
|
-
|
13
|
-
dspy.
|
12
|
+
lm = dspy.LM('gpt-3.5-turbo')
|
13
|
+
dspy.configure(lm=lm)
|
14
14
|
|
15
15
|
# Load math questions from the GSM8K dataset
|
16
16
|
gsm8k = GSM8K()
|
@@ -5,8 +5,8 @@ from langtrace_python_sdk import langtrace, with_langtrace_root_span
|
|
5
5
|
|
6
6
|
langtrace.init()
|
7
7
|
|
8
|
-
|
9
|
-
dspy.
|
8
|
+
lm = dspy.LM('gpt-3.5-turbo')
|
9
|
+
dspy.configure(lm=lm)
|
10
10
|
|
11
11
|
|
12
12
|
# Define a simple signature for basic question answering
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/dspy_example/react.py
RENAMED
@@ -15,8 +15,8 @@ from langtrace_python_sdk import langtrace, with_langtrace_root_span
|
|
15
15
|
|
16
16
|
langtrace.init()
|
17
17
|
|
18
|
-
|
19
|
-
dspy.
|
18
|
+
lm = dspy.LM('gpt-3.5-turbo')
|
19
|
+
dspy.configure(lm=lm)
|
20
20
|
|
21
21
|
colbertv2_wiki17_abstracts = dspy.ColBERTv2(
|
22
22
|
url="http://20.102.90.50:2017/wiki17_abstracts"
|
@@ -23,7 +23,7 @@ from opentelemetry.trace import TracerProvider
|
|
23
23
|
from opentelemetry.trace import get_tracer
|
24
24
|
from wrapt import wrap_function_wrapper
|
25
25
|
from typing import Any
|
26
|
-
from langtrace_python_sdk.instrumentation.anthropic.patch import messages_create
|
26
|
+
from langtrace_python_sdk.instrumentation.anthropic.patch import messages_create, messages_stream
|
27
27
|
|
28
28
|
logging.basicConfig(level=logging.FATAL)
|
29
29
|
|
@@ -46,6 +46,12 @@ class AnthropicInstrumentation(BaseInstrumentor): # type: ignore[misc]
|
|
46
46
|
"Messages.create",
|
47
47
|
messages_create(version, tracer),
|
48
48
|
)
|
49
|
+
|
50
|
+
wrap_function_wrapper(
|
51
|
+
"anthropic.resources.messages",
|
52
|
+
"Messages.stream",
|
53
|
+
messages_stream(version, tracer),
|
54
|
+
)
|
49
55
|
|
50
56
|
def _instrument_module(self, module_name: str) -> None:
|
51
57
|
pass
|
@@ -0,0 +1,280 @@
|
|
1
|
+
"""
|
2
|
+
Copyright (c) 2024 Scale3 Labs
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
"""
|
16
|
+
|
17
|
+
from typing import Any, Callable, List, Iterator, Union
|
18
|
+
from langtrace.trace_attributes import SpanAttributes, LLMSpanAttributes
|
19
|
+
import json
|
20
|
+
|
21
|
+
from langtrace_python_sdk.utils.llm import (
|
22
|
+
StreamWrapper,
|
23
|
+
get_extra_attributes,
|
24
|
+
get_langtrace_attributes,
|
25
|
+
get_llm_request_attributes,
|
26
|
+
get_llm_url,
|
27
|
+
get_span_name,
|
28
|
+
set_event_completion,
|
29
|
+
set_span_attributes,
|
30
|
+
set_usage_attributes,
|
31
|
+
set_span_attribute,
|
32
|
+
)
|
33
|
+
from opentelemetry.trace import Span, Tracer, SpanKind
|
34
|
+
from opentelemetry.trace.status import StatusCode
|
35
|
+
from langtrace_python_sdk.constants.instrumentation.anthropic import APIS
|
36
|
+
from langtrace_python_sdk.constants.instrumentation.common import SERVICE_PROVIDERS
|
37
|
+
from langtrace_python_sdk.instrumentation.anthropic.types import (
|
38
|
+
StreamingResult,
|
39
|
+
ResultType,
|
40
|
+
MessagesCreateKwargs,
|
41
|
+
)
|
42
|
+
|
43
|
+
|
44
|
+
def messages_create(version: str, tracer: Tracer) -> Callable[..., Any]:
|
45
|
+
"""Wrap the `messages_create` method."""
|
46
|
+
|
47
|
+
def traced_method(
|
48
|
+
wrapped: Callable[..., Any],
|
49
|
+
instance: Any,
|
50
|
+
args: List[Any],
|
51
|
+
kwargs: MessagesCreateKwargs,
|
52
|
+
) -> Any:
|
53
|
+
service_provider = SERVICE_PROVIDERS["ANTHROPIC"]
|
54
|
+
|
55
|
+
# Extract system from kwargs and attach as a role to the prompts
|
56
|
+
prompts = kwargs.get("messages", [])
|
57
|
+
system = kwargs.get("system")
|
58
|
+
if system:
|
59
|
+
prompts.append({"role": "system", "content": system})
|
60
|
+
span_attributes = {
|
61
|
+
**get_langtrace_attributes(version, service_provider),
|
62
|
+
**get_llm_request_attributes(kwargs, prompts=prompts),
|
63
|
+
**get_llm_url(instance),
|
64
|
+
SpanAttributes.LLM_PATH: APIS["MESSAGES_CREATE"]["ENDPOINT"],
|
65
|
+
**get_extra_attributes(),
|
66
|
+
}
|
67
|
+
|
68
|
+
attributes = LLMSpanAttributes(**span_attributes)
|
69
|
+
|
70
|
+
span = tracer.start_span(
|
71
|
+
name=get_span_name(APIS["MESSAGES_CREATE"]["METHOD"]), kind=SpanKind.CLIENT
|
72
|
+
)
|
73
|
+
|
74
|
+
set_span_attributes(span, attributes)
|
75
|
+
|
76
|
+
tools = []
|
77
|
+
if kwargs.get("tools") is not None and kwargs.get("tools"):
|
78
|
+
tools.append(json.dumps(kwargs.get("tools")))
|
79
|
+
set_span_attribute(span, SpanAttributes.LLM_TOOLS, json.dumps(tools))
|
80
|
+
|
81
|
+
try:
|
82
|
+
# Attempt to call the original method
|
83
|
+
result = wrapped(*args, **kwargs)
|
84
|
+
return set_response_attributes(result, span)
|
85
|
+
|
86
|
+
except Exception as err:
|
87
|
+
# Record the exception in the span
|
88
|
+
span.record_exception(err)
|
89
|
+
# Set the span status to indicate an error
|
90
|
+
span.set_status(StatusCode.ERROR, str(err))
|
91
|
+
# Reraise the exception to ensure it's not swallowed
|
92
|
+
span.end()
|
93
|
+
raise
|
94
|
+
|
95
|
+
def set_response_attributes(
|
96
|
+
result: Union[ResultType, StreamingResult], span: Span
|
97
|
+
) -> Any:
|
98
|
+
if not isinstance(result, Iterator):
|
99
|
+
if hasattr(result, "content") and result.content is not None:
|
100
|
+
set_span_attribute(
|
101
|
+
span, SpanAttributes.LLM_RESPONSE_MODEL, result.model
|
102
|
+
)
|
103
|
+
if hasattr(result, "content") and result.content[0] is not None:
|
104
|
+
content = result.content[0]
|
105
|
+
typ = content.type
|
106
|
+
role = result.role if result.role else "assistant"
|
107
|
+
if typ == "tool_result" or typ == "tool_use":
|
108
|
+
content = content.json() # type: ignore
|
109
|
+
set_span_attribute(
|
110
|
+
span, SpanAttributes.LLM_TOOL_RESULTS, json.dumps(content)
|
111
|
+
)
|
112
|
+
if typ == "text":
|
113
|
+
content = result.content[0].text
|
114
|
+
set_event_completion(
|
115
|
+
span, [{"type": typ, "role": role, "content": content}]
|
116
|
+
)
|
117
|
+
|
118
|
+
if (
|
119
|
+
hasattr(result, "system_fingerprint")
|
120
|
+
and result.system_fingerprint is not None
|
121
|
+
):
|
122
|
+
span.set_attribute(
|
123
|
+
SpanAttributes.LLM_SYSTEM_FINGERPRINT,
|
124
|
+
result.system_fingerprint,
|
125
|
+
)
|
126
|
+
# Get the usage
|
127
|
+
if hasattr(result, "usage") and result.usage is not None:
|
128
|
+
usage = result.usage
|
129
|
+
set_usage_attributes(span, vars(usage))
|
130
|
+
|
131
|
+
span.set_status(StatusCode.OK)
|
132
|
+
span.end()
|
133
|
+
return result
|
134
|
+
else:
|
135
|
+
return StreamWrapper(result, span, tool_calls=True)
|
136
|
+
|
137
|
+
# return the wrapped method
|
138
|
+
return traced_method
|
139
|
+
|
140
|
+
|
141
|
+
def messages_stream(version: str, tracer: Tracer) -> Callable[..., Any]:
|
142
|
+
|
143
|
+
def traced_method(
|
144
|
+
wrapped: Callable[..., Any],
|
145
|
+
instance: Any,
|
146
|
+
args: List[Any],
|
147
|
+
kwargs: MessagesCreateKwargs,
|
148
|
+
) -> Any:
|
149
|
+
service_provider = SERVICE_PROVIDERS["ANTHROPIC"]
|
150
|
+
|
151
|
+
prompts = kwargs.get("messages", [])
|
152
|
+
system = kwargs.get("system")
|
153
|
+
if system:
|
154
|
+
prompts.append({"role": "assistant", "content": system})
|
155
|
+
span_attributes = {
|
156
|
+
**get_langtrace_attributes(version, service_provider),
|
157
|
+
**get_llm_request_attributes(kwargs, prompts=prompts),
|
158
|
+
**get_llm_url(instance),
|
159
|
+
SpanAttributes.LLM_PATH: APIS["MESSAGES_STREAM"]["ENDPOINT"],
|
160
|
+
**get_extra_attributes(),
|
161
|
+
}
|
162
|
+
|
163
|
+
attributes = LLMSpanAttributes(**span_attributes)
|
164
|
+
|
165
|
+
span = tracer.start_span(
|
166
|
+
name=get_span_name(APIS["MESSAGES_STREAM"]["METHOD"]), kind=SpanKind.CLIENT
|
167
|
+
)
|
168
|
+
|
169
|
+
set_span_attributes(span, attributes)
|
170
|
+
|
171
|
+
tools = []
|
172
|
+
if kwargs.get("tools") is not None:
|
173
|
+
tools.append(json.dumps(kwargs.get("tools")))
|
174
|
+
set_span_attribute(span, SpanAttributes.LLM_TOOLS, json.dumps(tools))
|
175
|
+
|
176
|
+
try:
|
177
|
+
# Create the original message stream manager
|
178
|
+
original_stream_manager = wrapped(*args, **kwargs)
|
179
|
+
|
180
|
+
# Create a new stream manager that will instrument the stream
|
181
|
+
# while preserving the stream
|
182
|
+
class InstrumentedMessageStreamManager:
|
183
|
+
def __init__(self, original_manager, span):
|
184
|
+
self.original_manager = original_manager
|
185
|
+
self.span = span
|
186
|
+
|
187
|
+
def __enter__(self):
|
188
|
+
# Enter the original context manager to get the stream
|
189
|
+
original_stream = self.original_manager.__enter__()
|
190
|
+
|
191
|
+
# Create a wrapper iterator
|
192
|
+
class InstrumentedStream:
|
193
|
+
def __init__(self, original_stream, span):
|
194
|
+
self.original_stream = original_stream
|
195
|
+
self.span = span
|
196
|
+
self.message_stop_processed = False
|
197
|
+
|
198
|
+
def __iter__(self):
|
199
|
+
return self
|
200
|
+
|
201
|
+
def __next__(self):
|
202
|
+
try:
|
203
|
+
chunk = next(self.original_stream)
|
204
|
+
|
205
|
+
# Apply instrumentation only once on message_stop
|
206
|
+
if chunk.type == "message_stop" and not self.message_stop_processed:
|
207
|
+
self.message_stop_processed = True
|
208
|
+
response_message = chunk.message
|
209
|
+
|
210
|
+
responses = [
|
211
|
+
{
|
212
|
+
"role": (
|
213
|
+
response_message.role
|
214
|
+
if response_message.role
|
215
|
+
else "assistant"
|
216
|
+
),
|
217
|
+
"content": message.text,
|
218
|
+
}
|
219
|
+
for message in response_message.content if message.type == "text"
|
220
|
+
]
|
221
|
+
|
222
|
+
set_event_completion(self.span, responses)
|
223
|
+
|
224
|
+
if hasattr(response_message, "usage") and response_message.usage is not None:
|
225
|
+
set_span_attribute(
|
226
|
+
self.span,
|
227
|
+
SpanAttributes.LLM_USAGE_PROMPT_TOKENS,
|
228
|
+
response_message.usage.input_tokens,
|
229
|
+
)
|
230
|
+
set_span_attribute(
|
231
|
+
self.span,
|
232
|
+
SpanAttributes.LLM_USAGE_COMPLETION_TOKENS,
|
233
|
+
response_message.usage.output_tokens,
|
234
|
+
)
|
235
|
+
set_span_attribute(
|
236
|
+
self.span,
|
237
|
+
SpanAttributes.LLM_USAGE_TOTAL_TOKENS,
|
238
|
+
response_message.usage.input_tokens + response_message.usage.output_tokens,
|
239
|
+
)
|
240
|
+
|
241
|
+
# Forward the chunk
|
242
|
+
return chunk
|
243
|
+
except StopIteration:
|
244
|
+
# End the span when we're done with the stream
|
245
|
+
self.span.end()
|
246
|
+
raise
|
247
|
+
except Exception as err:
|
248
|
+
self.span.record_exception(err)
|
249
|
+
self.span.set_status(StatusCode.ERROR, str(err))
|
250
|
+
self.span.end()
|
251
|
+
raise
|
252
|
+
|
253
|
+
def close(self):
|
254
|
+
self.original_stream.close()
|
255
|
+
if not self.message_stop_processed:
|
256
|
+
self.span.end()
|
257
|
+
|
258
|
+
# Return our instrumented stream wrapper
|
259
|
+
return InstrumentedStream(original_stream, self.span)
|
260
|
+
|
261
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
262
|
+
result = self.original_manager.__exit__(exc_type, exc_val, exc_tb)
|
263
|
+
|
264
|
+
if exc_type is not None:
|
265
|
+
self.span.record_exception(exc_val)
|
266
|
+
self.span.set_status(StatusCode.ERROR, str(exc_val))
|
267
|
+
self.span.end()
|
268
|
+
|
269
|
+
return result
|
270
|
+
|
271
|
+
# Return the instrumented stream manager
|
272
|
+
return InstrumentedMessageStreamManager(original_stream_manager, span)
|
273
|
+
|
274
|
+
except Exception as err:
|
275
|
+
span.record_exception(err)
|
276
|
+
span.set_status(StatusCode.ERROR, str(err))
|
277
|
+
span.end()
|
278
|
+
raise
|
279
|
+
|
280
|
+
return traced_method
|
@@ -63,6 +63,10 @@ def generic_patch(version: str, tracer: Tracer) -> Callable:
|
|
63
63
|
result_json = str(result)
|
64
64
|
|
65
65
|
span.set_attribute("tlm.result", str(result_json))
|
66
|
+
trustworthiness_score = result_json["trustworthiness_score"]
|
67
|
+
log = result_json["log"]
|
68
|
+
span.set_attribute("tlm.trustworthiness_score", str(trustworthiness_score))
|
69
|
+
span.set_attribute("tlm.explanation", str(log.get("explanation", "")))
|
66
70
|
span.set_status(Status(StatusCode.OK))
|
67
71
|
|
68
72
|
return result
|
@@ -70,11 +70,6 @@ class DspyInstrumentation(BaseInstrumentor):
|
|
70
70
|
"MultiChainComparison.forward",
|
71
71
|
patch_signature("MultiChainComparison.forward", version, tracer),
|
72
72
|
)
|
73
|
-
_W(
|
74
|
-
"dspy.predict.retry",
|
75
|
-
"Retry.forward",
|
76
|
-
patch_signature("Retry.forward", version, tracer),
|
77
|
-
)
|
78
73
|
_W(
|
79
74
|
"dspy.evaluate.evaluate",
|
80
75
|
"Evaluate.__call__",
|
@@ -38,7 +38,7 @@ def patch_bootstrapfewshot_optimizer(operation_name, version, tracer):
|
|
38
38
|
prog = {
|
39
39
|
"name": args[0].prog.__class__.__name__,
|
40
40
|
"signature": (
|
41
|
-
str(args[0].prog.signature) if args[0].prog
|
41
|
+
str(args[0].prog.signature) if hasattr(args[0].prog, "signature") else None
|
42
42
|
),
|
43
43
|
}
|
44
44
|
span_attributes["dspy.optimizer.module.prog"] = json.dumps(prog)
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "3.8.17"
|
@@ -1,133 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Copyright (c) 2024 Scale3 Labs
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
"""
|
16
|
-
|
17
|
-
from typing import Any, Callable, List, Iterator, Union
|
18
|
-
from langtrace.trace_attributes import SpanAttributes, LLMSpanAttributes
|
19
|
-
import json
|
20
|
-
|
21
|
-
from langtrace_python_sdk.utils.llm import (
|
22
|
-
StreamWrapper,
|
23
|
-
get_extra_attributes,
|
24
|
-
get_langtrace_attributes,
|
25
|
-
get_llm_request_attributes,
|
26
|
-
get_llm_url,
|
27
|
-
get_span_name,
|
28
|
-
set_event_completion,
|
29
|
-
set_span_attributes,
|
30
|
-
set_usage_attributes,
|
31
|
-
set_span_attribute,
|
32
|
-
)
|
33
|
-
from opentelemetry.trace import Span, Tracer, SpanKind
|
34
|
-
from opentelemetry.trace.status import StatusCode
|
35
|
-
from langtrace_python_sdk.constants.instrumentation.anthropic import APIS
|
36
|
-
from langtrace_python_sdk.constants.instrumentation.common import SERVICE_PROVIDERS
|
37
|
-
from langtrace_python_sdk.instrumentation.anthropic.types import (
|
38
|
-
StreamingResult,
|
39
|
-
ResultType,
|
40
|
-
MessagesCreateKwargs,
|
41
|
-
)
|
42
|
-
|
43
|
-
|
44
|
-
def messages_create(version: str, tracer: Tracer) -> Callable[..., Any]:
|
45
|
-
"""Wrap the `messages_create` method."""
|
46
|
-
|
47
|
-
def traced_method(
|
48
|
-
wrapped: Callable[..., Any],
|
49
|
-
instance: Any,
|
50
|
-
args: List[Any],
|
51
|
-
kwargs: MessagesCreateKwargs,
|
52
|
-
) -> Any:
|
53
|
-
service_provider = SERVICE_PROVIDERS["ANTHROPIC"]
|
54
|
-
|
55
|
-
# Extract system from kwargs and attach as a role to the prompts
|
56
|
-
prompts = kwargs.get("messages", [])
|
57
|
-
system = kwargs.get("system")
|
58
|
-
if system:
|
59
|
-
prompts = [{"role": "system", "content": system}] + kwargs.get(
|
60
|
-
"messages", []
|
61
|
-
)
|
62
|
-
span_attributes = {
|
63
|
-
**get_langtrace_attributes(version, service_provider),
|
64
|
-
**get_llm_request_attributes(kwargs, prompts=prompts),
|
65
|
-
**get_llm_url(instance),
|
66
|
-
SpanAttributes.LLM_PATH: APIS["MESSAGES_CREATE"]["ENDPOINT"],
|
67
|
-
**get_extra_attributes(),
|
68
|
-
}
|
69
|
-
|
70
|
-
attributes = LLMSpanAttributes(**span_attributes)
|
71
|
-
|
72
|
-
span = tracer.start_span(
|
73
|
-
name=get_span_name(APIS["MESSAGES_CREATE"]["METHOD"]), kind=SpanKind.CLIENT
|
74
|
-
)
|
75
|
-
set_span_attributes(span, attributes)
|
76
|
-
try:
|
77
|
-
# Attempt to call the original method
|
78
|
-
result = wrapped(*args, **kwargs)
|
79
|
-
return set_response_attributes(result, span)
|
80
|
-
|
81
|
-
except Exception as err:
|
82
|
-
# Record the exception in the span
|
83
|
-
span.record_exception(err)
|
84
|
-
# Set the span status to indicate an error
|
85
|
-
span.set_status(StatusCode.ERROR, str(err))
|
86
|
-
# Reraise the exception to ensure it's not swallowed
|
87
|
-
span.end()
|
88
|
-
raise
|
89
|
-
|
90
|
-
def set_response_attributes(
|
91
|
-
result: Union[ResultType, StreamingResult], span: Span
|
92
|
-
) -> Any:
|
93
|
-
if not isinstance(result, Iterator):
|
94
|
-
if hasattr(result, "content") and result.content is not None:
|
95
|
-
set_span_attribute(
|
96
|
-
span, SpanAttributes.LLM_RESPONSE_MODEL, result.model
|
97
|
-
)
|
98
|
-
if hasattr(result, "content") and result.content[0] is not None:
|
99
|
-
content = result.content[0]
|
100
|
-
typ = content.type
|
101
|
-
role = result.role if result.role else "assistant"
|
102
|
-
if typ == "tool_result" or typ == "tool_use":
|
103
|
-
content = content.json() # type: ignore
|
104
|
-
set_span_attribute(
|
105
|
-
span, SpanAttributes.LLM_TOOL_RESULTS, json.dumps(content)
|
106
|
-
)
|
107
|
-
if typ == "text":
|
108
|
-
content = result.content[0].text
|
109
|
-
set_event_completion(
|
110
|
-
span, [{"type": typ, "role": role, "content": content}]
|
111
|
-
)
|
112
|
-
|
113
|
-
if (
|
114
|
-
hasattr(result, "system_fingerprint")
|
115
|
-
and result.system_fingerprint is not None
|
116
|
-
):
|
117
|
-
span.set_attribute(
|
118
|
-
SpanAttributes.LLM_SYSTEM_FINGERPRINT,
|
119
|
-
result.system_fingerprint,
|
120
|
-
)
|
121
|
-
# Get the usage
|
122
|
-
if hasattr(result, "usage") and result.usage is not None:
|
123
|
-
usage = result.usage
|
124
|
-
set_usage_attributes(span, vars(usage))
|
125
|
-
|
126
|
-
span.set_status(StatusCode.OK)
|
127
|
-
span.end()
|
128
|
-
return result
|
129
|
-
else:
|
130
|
-
return StreamWrapper(result, span)
|
131
|
-
|
132
|
-
# return the wrapped method
|
133
|
-
return traced_method
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "3.8.14"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/autogen_example/__init__.py
RENAMED
File without changes
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/autogen_example/main.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cerebras_example/main.py
RENAMED
File without changes
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/chroma_example/__init__.py
RENAMED
File without changes
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/chroma_example/basic.py
RENAMED
File without changes
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cleanlab_example/simple.py
RENAMED
File without changes
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/__init__.py
RENAMED
File without changes
|
{langtrace_python_sdk-3.8.14 → langtrace_python_sdk-3.8.17}/src/examples/cohere_example/chat.py
RENAMED
File without changes
|
File without changes
|
File without changes
|