langtrace-python-sdk 2.2.30__tar.gz → 2.2.31__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.2.30 → langtrace_python_sdk-2.2.31}/PKG-INFO +1 -1
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/simple_agent/agents.py +1 -1
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/simple_agent/main.py +3 -13
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/simple_agent/tasks.py +1 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/trip_planner/main.py +1 -30
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/crewai/instrumentation.py +1 -1
- langtrace_python_sdk-2.2.31/src/langtrace_python_sdk/instrumentation/crewai/patch.py +234 -0
- langtrace_python_sdk-2.2.31/src/langtrace_python_sdk/version.py +1 -0
- langtrace_python_sdk-2.2.30/src/langtrace_python_sdk/instrumentation/crewai/patch.py +0 -176
- langtrace_python_sdk-2.2.30/src/langtrace_python_sdk/version.py +0 -1
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/.gitignore +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/LICENSE +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/README.md +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/pyproject.toml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/anthropic_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/anthropic_example/completion.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/chroma_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/chroma_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/chat.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/chat_stream.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/embed.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/rerank.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/tools.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/simple_agent/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/trip_planner/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/trip_planner/agents.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/trip_planner/tasks.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/trip_planner/tools/calculator.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/trip_planner/tools/search_tools.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/dspy_example/math_problems_cot.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/dspy_example/math_problems_cot_parallel.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/dspy_example/program_of_thought_basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/dspy_example/quiz_gen.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/dspy_example/react.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/fastapi_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/fastapi_example/basic_route.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/gemini_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/gemini_example/function_tools.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/gemini_example/main.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/hiveagent_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/inspect_ai_example/basic_eval.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/langchain_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/langchain_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/langchain_example/groq_example.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/langchain_example/langgraph_example.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/langchain_example/sagemaker.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/langchain_example/tool.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/litellm_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/llamaindex_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/llamaindex_example/agent.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/llamaindex_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/llamaindex_example/data/abramov.txt +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/mistral_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/mistral_example/complete.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/mistral_example/complete_async.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/mistral_example/embeddings.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/ollama_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/ollama_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/async_tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/async_tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/chat_completion.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/chat_completion_tool_choice.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/embeddings_create.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/function_calling.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/images_edit.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/images_generate.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/resources/lounge_flamingo.png +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/resources/mask.png +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/send_user_feedback.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/tool_calling.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/openai_example/tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/otlp_example/otlp_basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/otlp_example/otlp_with_langtrace.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/perplexity_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/pinecone_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/pinecone_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/qdrant_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/qdrant_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/routellm_example/basic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/vertexai_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/vertexai_example/main.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/weaviate_example/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/weaviate_example/query_text.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/common.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/gemini.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/mistral.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/ollama.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/vertexai.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/extensions/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/extensions/langtrace_filesystem.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/crewai/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/dspy/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/dspy/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/dspy/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/gemini/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/gemini/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/gemini/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/mistral/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/mistral/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/mistral/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/ollama/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/ollama/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/ollama/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/openai/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/vertexai/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/vertexai/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/vertexai/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/weaviate/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/langtrace.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/types/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/langtrace_sampler.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/llm.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/misc.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/sdk_version_checker.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/types.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/langtrace_python_sdk/utils/with_root_span.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/run_example.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/__init__.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/anthropic/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/anthropic/test_anthropic.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/chroma/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/chroma/test_chroma.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/cohere/cassettes/test_cohere_chat.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/cohere/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/cohere/test_cohere_chat.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/cohere/test_cohere_embed.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/cohere/test_cohere_rerank.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/groq/cassettes/test_async_chat_completion.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/groq/cassettes/test_async_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/groq/cassettes/test_chat_completion.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/groq/cassettes/test_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/groq/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/groq/test_groq.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/langchain/cassettes/test_langchain.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/langchain/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/langchain/test_langchain.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/test_chat_completion.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/test_embeddings.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/openai/test_image_generation.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/pinecone/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/pinecone/test_pinecone.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/qdrant/conftest.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/qdrant/test_qdrant.py +0 -0
- {langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/tests/utils.py +0 -0
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
from crewai import Crew
|
|
2
|
-
from textwrap import dedent
|
|
3
2
|
from .agents import PoetryAgents
|
|
4
3
|
from .tasks import PoetryTasks
|
|
5
4
|
from langtrace_python_sdk import langtrace
|
|
6
5
|
from dotenv import load_dotenv
|
|
7
|
-
import agentops
|
|
8
6
|
|
|
9
7
|
load_dotenv()
|
|
10
|
-
|
|
11
|
-
langtrace.init(write_spans_to_console=False, batch=False)
|
|
8
|
+
langtrace.init()
|
|
12
9
|
|
|
13
10
|
|
|
14
11
|
class PoetryCrew:
|
|
@@ -29,18 +26,11 @@ class PoetryCrew:
|
|
|
29
26
|
|
|
30
27
|
|
|
31
28
|
# This is the main function that you will use to run your custom crew.
|
|
29
|
+
# You can run this file using `python -m src.examples.crewai_example.simple_agent.main`
|
|
32
30
|
if __name__ == "__main__":
|
|
33
31
|
print("## Welcome to Poetry Crew")
|
|
34
32
|
print("-------------------------------")
|
|
35
|
-
|
|
36
|
-
dedent(
|
|
37
|
-
"""
|
|
38
|
-
What topic do you want to write a poem on?
|
|
39
|
-
"""
|
|
40
|
-
)
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
poetry_crew = PoetryCrew(topic=topic)
|
|
33
|
+
poetry_crew = PoetryCrew(topic="cold")
|
|
44
34
|
result = poetry_crew.run()
|
|
45
35
|
print("\n\n########################")
|
|
46
36
|
print("## Here is you poem")
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from crewai import Crew
|
|
2
|
-
from textwrap import dedent
|
|
3
2
|
from .agents import TravelAgents
|
|
4
3
|
from .tasks import TravelTasks
|
|
5
4
|
from langtrace_python_sdk import langtrace
|
|
@@ -59,36 +58,8 @@ class TripCrew:
|
|
|
59
58
|
if __name__ == "__main__":
|
|
60
59
|
print("## Welcome to Trip Planner Crew")
|
|
61
60
|
print("-------------------------------")
|
|
62
|
-
origin = input(
|
|
63
|
-
dedent(
|
|
64
|
-
"""
|
|
65
|
-
From where will you be traveling from?
|
|
66
|
-
"""
|
|
67
|
-
)
|
|
68
|
-
)
|
|
69
|
-
cities = input(
|
|
70
|
-
dedent(
|
|
71
|
-
"""
|
|
72
|
-
What are the cities options you are interested in visiting?
|
|
73
|
-
"""
|
|
74
|
-
)
|
|
75
|
-
)
|
|
76
|
-
date_range = input(
|
|
77
|
-
dedent(
|
|
78
|
-
"""
|
|
79
|
-
What is the date range you are interested in traveling?
|
|
80
|
-
"""
|
|
81
|
-
)
|
|
82
|
-
)
|
|
83
|
-
interests = input(
|
|
84
|
-
dedent(
|
|
85
|
-
"""
|
|
86
|
-
What are some of your high level interests and hobbies?
|
|
87
|
-
"""
|
|
88
|
-
)
|
|
89
|
-
)
|
|
90
61
|
|
|
91
|
-
trip_crew = TripCrew(
|
|
62
|
+
trip_crew = TripCrew("cairo", "marsa alam", "sep", "scuba diving")
|
|
92
63
|
result = trip_crew.run()
|
|
93
64
|
print("\n\n########################")
|
|
94
65
|
print("## Here is you Trip Plan")
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from importlib_metadata import version as v
|
|
3
|
+
from langtrace_python_sdk.constants import LANGTRACE_SDK_NAME
|
|
4
|
+
from langtrace_python_sdk.utils import set_span_attribute
|
|
5
|
+
from langtrace_python_sdk.utils.llm import get_span_name, set_span_attributes
|
|
6
|
+
from langtrace_python_sdk.constants.instrumentation.common import (
|
|
7
|
+
LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY,
|
|
8
|
+
SERVICE_PROVIDERS,
|
|
9
|
+
)
|
|
10
|
+
from opentelemetry import baggage
|
|
11
|
+
from langtrace.trace_attributes import FrameworkSpanAttributes
|
|
12
|
+
from opentelemetry.trace import SpanKind, Span, Tracer
|
|
13
|
+
from opentelemetry.trace.status import Status, StatusCode
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
crew_properties = {
|
|
17
|
+
"tasks": "object",
|
|
18
|
+
"agents": "object",
|
|
19
|
+
"cache": "bool",
|
|
20
|
+
"process": "object",
|
|
21
|
+
"verbose": "bool",
|
|
22
|
+
"memory": "bool",
|
|
23
|
+
"embedder": "json",
|
|
24
|
+
"full_output": "bool",
|
|
25
|
+
"manager_llm": "object",
|
|
26
|
+
"manager_agent": "object",
|
|
27
|
+
"manager_callbacks": "object",
|
|
28
|
+
"function_calling_llm": "object",
|
|
29
|
+
"config": "json",
|
|
30
|
+
"id": "object",
|
|
31
|
+
"max_rpm": "int",
|
|
32
|
+
"share_crew": "bool",
|
|
33
|
+
"step_callback": "object",
|
|
34
|
+
"task_callback": "object",
|
|
35
|
+
"prompt_file": "str",
|
|
36
|
+
"output_log_file": "bool",
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
task_properties = {
|
|
40
|
+
"id": "object",
|
|
41
|
+
"used_tools": "int",
|
|
42
|
+
"tools_errors": "int",
|
|
43
|
+
"delegations": "int",
|
|
44
|
+
"i18n": "object",
|
|
45
|
+
"thread": "object",
|
|
46
|
+
"prompt_context": "object",
|
|
47
|
+
"description": "str",
|
|
48
|
+
"expected_output": "str",
|
|
49
|
+
"config": "object",
|
|
50
|
+
"callback": "str",
|
|
51
|
+
"agent": "object",
|
|
52
|
+
"context": "object",
|
|
53
|
+
"async_execution": "bool",
|
|
54
|
+
"output_json": "object",
|
|
55
|
+
"output_pydantic": "object",
|
|
56
|
+
"output_file": "object",
|
|
57
|
+
"output": "object",
|
|
58
|
+
"tools": "object",
|
|
59
|
+
"human_input": "bool",
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
agent_properties = {
|
|
63
|
+
"formatting_errors": "int",
|
|
64
|
+
"id": "object",
|
|
65
|
+
"role": "str",
|
|
66
|
+
"goal": "str",
|
|
67
|
+
"backstory": "str",
|
|
68
|
+
"cache": "bool",
|
|
69
|
+
"config": "object",
|
|
70
|
+
"max_rpm": "int",
|
|
71
|
+
"verbose": "bool",
|
|
72
|
+
"allow_delegation": "bool",
|
|
73
|
+
"tools": "object",
|
|
74
|
+
"max_iter": "int",
|
|
75
|
+
"max_execution_time": "object",
|
|
76
|
+
"agent_executor": "object",
|
|
77
|
+
"tools_handler": "object",
|
|
78
|
+
"force_answer_max_iterations": "int",
|
|
79
|
+
"crew": "object",
|
|
80
|
+
"cache_handler": "object",
|
|
81
|
+
"step_callback": "object",
|
|
82
|
+
"i18n": "object",
|
|
83
|
+
"llm": "object",
|
|
84
|
+
"function_calling_llm": "object",
|
|
85
|
+
"callbacks": "object",
|
|
86
|
+
"system_template": "object",
|
|
87
|
+
"prompt_template": "object",
|
|
88
|
+
"response_template": "object",
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def patch_crew(operation_name, version, tracer: Tracer):
|
|
93
|
+
def traced_method(wrapped, instance, args, kwargs):
|
|
94
|
+
service_provider = SERVICE_PROVIDERS["CREWAI"]
|
|
95
|
+
extra_attributes = baggage.get_baggage(LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY)
|
|
96
|
+
span_attributes = {
|
|
97
|
+
"langtrace.sdk.name": "langtrace-python-sdk",
|
|
98
|
+
"langtrace.service.name": service_provider,
|
|
99
|
+
"langtrace.service.type": "framework",
|
|
100
|
+
"langtrace.service.version": version,
|
|
101
|
+
"langtrace.version": v(LANGTRACE_SDK_NAME),
|
|
102
|
+
**(extra_attributes if extra_attributes is not None else {}),
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
attributes = FrameworkSpanAttributes(**span_attributes)
|
|
106
|
+
|
|
107
|
+
with tracer.start_as_current_span(
|
|
108
|
+
get_span_name(operation_name), kind=SpanKind.CLIENT
|
|
109
|
+
) as span:
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
set_span_attributes(span, attributes)
|
|
113
|
+
CrewAISpanAttributes(span=span, instance=instance)
|
|
114
|
+
result = wrapped(*args, **kwargs)
|
|
115
|
+
if result:
|
|
116
|
+
span.set_status(Status(StatusCode.OK))
|
|
117
|
+
|
|
118
|
+
span.end()
|
|
119
|
+
return result
|
|
120
|
+
|
|
121
|
+
except Exception as err:
|
|
122
|
+
print("Error", err)
|
|
123
|
+
# Record the exception in the span
|
|
124
|
+
span.record_exception(err)
|
|
125
|
+
|
|
126
|
+
# Set the span status to indicate an error
|
|
127
|
+
span.set_status(Status(StatusCode.ERROR, str(err)))
|
|
128
|
+
|
|
129
|
+
# Reraise the exception to ensure it's not swallowed
|
|
130
|
+
raise
|
|
131
|
+
|
|
132
|
+
return traced_method
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class CrewAISpanAttributes:
|
|
136
|
+
span: Span
|
|
137
|
+
crew: dict
|
|
138
|
+
|
|
139
|
+
def __init__(self, span: Span, instance) -> None:
|
|
140
|
+
self.span = span
|
|
141
|
+
self.instance = instance
|
|
142
|
+
self.crew = {
|
|
143
|
+
"tasks": [],
|
|
144
|
+
"agents": [],
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
self.run()
|
|
148
|
+
|
|
149
|
+
def run(self):
|
|
150
|
+
instance_name = self.instance.__class__.__name__
|
|
151
|
+
if instance_name == "Crew":
|
|
152
|
+
self.set_crew_attributes()
|
|
153
|
+
set_span_attribute(self.span, "crewai.crew.config", json.dumps(self.crew))
|
|
154
|
+
|
|
155
|
+
elif instance_name == "Agent":
|
|
156
|
+
agent = self.set_agent_attributes()
|
|
157
|
+
# for key, value in agent.items():
|
|
158
|
+
# set_span_attribute(self.span, key, value)
|
|
159
|
+
set_span_attribute(self.span, "crewai.agent.config", json.dumps(agent))
|
|
160
|
+
elif instance_name == "Task":
|
|
161
|
+
task = self.set_task_attributes()
|
|
162
|
+
# uncomment if you want to spread attributes for the UI instead of dumping the whole object
|
|
163
|
+
# for key, value in task.items():
|
|
164
|
+
# set_span_attribute(self.span, key, value)
|
|
165
|
+
set_span_attribute(self.span, "crewai.task.config", json.dumps(task))
|
|
166
|
+
|
|
167
|
+
def set_crew_attributes(self):
|
|
168
|
+
for key, value in self.instance.__dict__.items():
|
|
169
|
+
if key == "tasks":
|
|
170
|
+
self._parse_tasks(value)
|
|
171
|
+
|
|
172
|
+
elif key == "agents":
|
|
173
|
+
self._parse_agents(value)
|
|
174
|
+
else:
|
|
175
|
+
self.crew[key] = str(value)
|
|
176
|
+
|
|
177
|
+
def set_agent_attributes(self):
|
|
178
|
+
agent = {}
|
|
179
|
+
for key, value in self.instance.__dict__.items():
|
|
180
|
+
if value is None:
|
|
181
|
+
continue
|
|
182
|
+
agent[key] = str(value)
|
|
183
|
+
|
|
184
|
+
return agent
|
|
185
|
+
|
|
186
|
+
def set_task_attributes(self):
|
|
187
|
+
task = {}
|
|
188
|
+
for key, value in self.instance.__dict__.items():
|
|
189
|
+
if value is None:
|
|
190
|
+
continue
|
|
191
|
+
|
|
192
|
+
if key == "agent":
|
|
193
|
+
task[key] = value.role
|
|
194
|
+
else:
|
|
195
|
+
task[key] = str(value)
|
|
196
|
+
return task
|
|
197
|
+
|
|
198
|
+
def _parse_agents(self, agents):
|
|
199
|
+
for agent in agents:
|
|
200
|
+
model = None
|
|
201
|
+
if agent.llm is not None:
|
|
202
|
+
if hasattr(agent.llm, "model"):
|
|
203
|
+
model = agent.llm.model
|
|
204
|
+
elif hasattr(agent.llm, "model_name"):
|
|
205
|
+
model = agent.llm.model_name
|
|
206
|
+
self.crew["agents"].append(
|
|
207
|
+
{
|
|
208
|
+
"id": str(agent.id),
|
|
209
|
+
"role": agent.role,
|
|
210
|
+
"goal": agent.goal,
|
|
211
|
+
"backstory": agent.backstory,
|
|
212
|
+
"cache": agent.cache,
|
|
213
|
+
"config": agent.config,
|
|
214
|
+
"verbose": agent.verbose,
|
|
215
|
+
"allow_delegation": agent.allow_delegation,
|
|
216
|
+
"tools": agent.tools,
|
|
217
|
+
"max_iter": agent.max_iter,
|
|
218
|
+
"llm": str(model if model is not None else ""),
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
def _parse_tasks(self, tasks):
|
|
223
|
+
for task in tasks:
|
|
224
|
+
self.crew["tasks"].append(
|
|
225
|
+
{
|
|
226
|
+
"agent": task.agent.role,
|
|
227
|
+
"description": task.description,
|
|
228
|
+
"async_execution": task.async_execution,
|
|
229
|
+
"expected_output": task.expected_output,
|
|
230
|
+
"human_input": task.human_input,
|
|
231
|
+
"tools": task.tools,
|
|
232
|
+
"output_file": task.output_file,
|
|
233
|
+
}
|
|
234
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.31"
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from importlib_metadata import version as v
|
|
3
|
-
from langtrace_python_sdk.constants import LANGTRACE_SDK_NAME
|
|
4
|
-
from langtrace_python_sdk.utils import set_span_attribute
|
|
5
|
-
from langtrace_python_sdk.utils.llm import get_span_name
|
|
6
|
-
from langtrace_python_sdk.utils.silently_fail import silently_fail
|
|
7
|
-
from langtrace_python_sdk.constants.instrumentation.common import (
|
|
8
|
-
LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY,
|
|
9
|
-
SERVICE_PROVIDERS,
|
|
10
|
-
)
|
|
11
|
-
from opentelemetry import baggage
|
|
12
|
-
from langtrace.trace_attributes import FrameworkSpanAttributes
|
|
13
|
-
from opentelemetry.trace import SpanKind
|
|
14
|
-
from opentelemetry.trace.status import Status, StatusCode
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
crew_properties = {
|
|
18
|
-
"tasks": "object",
|
|
19
|
-
"agents": "object",
|
|
20
|
-
"cache": "bool",
|
|
21
|
-
"process": "object",
|
|
22
|
-
"verbose": "bool",
|
|
23
|
-
"memory": "bool",
|
|
24
|
-
"embedder": "json",
|
|
25
|
-
"full_output": "bool",
|
|
26
|
-
"manager_llm": "object",
|
|
27
|
-
"manager_agent": "object",
|
|
28
|
-
"manager_callbacks": "object",
|
|
29
|
-
"function_calling_llm": "object",
|
|
30
|
-
"config": "json",
|
|
31
|
-
"id": "object",
|
|
32
|
-
"max_rpm": "int",
|
|
33
|
-
"share_crew": "bool",
|
|
34
|
-
"step_callback": "object",
|
|
35
|
-
"task_callback": "object",
|
|
36
|
-
"prompt_file": "object",
|
|
37
|
-
"output_log_file": "object",
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
task_properties = {
|
|
41
|
-
"id": "object",
|
|
42
|
-
"used_tools": "int",
|
|
43
|
-
"tools_errors": "int",
|
|
44
|
-
"delegations": "int",
|
|
45
|
-
"i18n": "object",
|
|
46
|
-
"thread": "object",
|
|
47
|
-
"prompt_context": "object",
|
|
48
|
-
"description": "str",
|
|
49
|
-
"expected_output": "str",
|
|
50
|
-
"config": "object",
|
|
51
|
-
"callback": "str",
|
|
52
|
-
"agent": "object",
|
|
53
|
-
"context": "object",
|
|
54
|
-
"async_execution": "bool",
|
|
55
|
-
"output_json": "object",
|
|
56
|
-
"output_pydantic": "object",
|
|
57
|
-
"output_file": "object",
|
|
58
|
-
"output": "object",
|
|
59
|
-
"tools": "object",
|
|
60
|
-
"human_input": "bool",
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
agent_properties = {
|
|
64
|
-
"formatting_errors": "int",
|
|
65
|
-
"id": "object",
|
|
66
|
-
"role": "str",
|
|
67
|
-
"goal": "str",
|
|
68
|
-
"backstory": "str",
|
|
69
|
-
"cache": "bool",
|
|
70
|
-
"config": "object",
|
|
71
|
-
"max_rpm": "int",
|
|
72
|
-
"verbose": "bool",
|
|
73
|
-
"allow_delegation": "bool",
|
|
74
|
-
"tools": "object",
|
|
75
|
-
"max_iter": "int",
|
|
76
|
-
"max_execution_time": "object",
|
|
77
|
-
"agent_executor": "object",
|
|
78
|
-
"tools_handler": "object",
|
|
79
|
-
"force_answer_max_iterations": "int",
|
|
80
|
-
"crew": "object",
|
|
81
|
-
"cache_handler": "object",
|
|
82
|
-
"step_callback": "object",
|
|
83
|
-
"i18n": "object",
|
|
84
|
-
"llm": "object",
|
|
85
|
-
"function_calling_llm": "object",
|
|
86
|
-
"callbacks": "object",
|
|
87
|
-
"system_template": "object",
|
|
88
|
-
"prompt_template": "object",
|
|
89
|
-
"response_template": "object",
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def patch_crew(operation_name, version, tracer):
|
|
94
|
-
def traced_method(wrapped, instance, args, kwargs):
|
|
95
|
-
|
|
96
|
-
service_provider = SERVICE_PROVIDERS["CREWAI"]
|
|
97
|
-
extra_attributes = baggage.get_baggage(LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY)
|
|
98
|
-
span_attributes = {
|
|
99
|
-
"langtrace.sdk.name": "langtrace-python-sdk",
|
|
100
|
-
"langtrace.service.name": service_provider,
|
|
101
|
-
"langtrace.service.type": "framework",
|
|
102
|
-
"langtrace.service.version": version,
|
|
103
|
-
"langtrace.version": v(LANGTRACE_SDK_NAME),
|
|
104
|
-
**(extra_attributes if extra_attributes is not None else {}),
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
crew_config = {}
|
|
108
|
-
for key, value in instance.__dict__.items():
|
|
109
|
-
if instance.__class__.__name__ == "Crew":
|
|
110
|
-
if key in crew_properties and value is not None:
|
|
111
|
-
if crew_properties[key] == "json":
|
|
112
|
-
crew_config[key] = json.dumps(value)
|
|
113
|
-
elif crew_properties[key] == "object":
|
|
114
|
-
crew_config[key] = str(value)
|
|
115
|
-
else:
|
|
116
|
-
crew_config[key] = value
|
|
117
|
-
elif instance.__class__.__name__ == "Agent":
|
|
118
|
-
if key in agent_properties and value is not None:
|
|
119
|
-
if agent_properties[key] == "json":
|
|
120
|
-
crew_config[key] = json.dumps(value)
|
|
121
|
-
elif agent_properties[key] == "object":
|
|
122
|
-
crew_config[key] = str(value)
|
|
123
|
-
else:
|
|
124
|
-
crew_config[key] = value
|
|
125
|
-
elif instance.__class__.__name__ == "Task":
|
|
126
|
-
if key in task_properties and value is not None:
|
|
127
|
-
if task_properties[key] == "json":
|
|
128
|
-
crew_config[key] = json.dumps(value)
|
|
129
|
-
elif task_properties[key] == "object":
|
|
130
|
-
crew_config[key] = str(value)
|
|
131
|
-
else:
|
|
132
|
-
crew_config[key] = value
|
|
133
|
-
if crew_config:
|
|
134
|
-
if instance.__class__.__name__ == "Crew":
|
|
135
|
-
if "inputs" in kwargs and kwargs["inputs"]:
|
|
136
|
-
crew_config["inputs"] = json.dumps(kwargs["inputs"])
|
|
137
|
-
span_attributes["crewai.crew.config"] = json.dumps(crew_config)
|
|
138
|
-
elif instance.__class__.__name__ == "Agent":
|
|
139
|
-
if "context" in kwargs and kwargs["context"]:
|
|
140
|
-
crew_config["context"] = json.dumps(kwargs["context"])
|
|
141
|
-
span_attributes["crewai.agent.config"] = json.dumps(crew_config)
|
|
142
|
-
elif instance.__class__.__name__ == "Task":
|
|
143
|
-
span_attributes["crewai.task.config"] = json.dumps(crew_config)
|
|
144
|
-
|
|
145
|
-
attributes = FrameworkSpanAttributes(**span_attributes)
|
|
146
|
-
|
|
147
|
-
with tracer.start_as_current_span(
|
|
148
|
-
get_span_name(operation_name), kind=SpanKind.CLIENT
|
|
149
|
-
) as span:
|
|
150
|
-
_set_input_attributes(span, kwargs, attributes)
|
|
151
|
-
|
|
152
|
-
try:
|
|
153
|
-
result = wrapped(*args, **kwargs)
|
|
154
|
-
if result:
|
|
155
|
-
span.set_status(Status(StatusCode.OK))
|
|
156
|
-
|
|
157
|
-
span.end()
|
|
158
|
-
return result
|
|
159
|
-
|
|
160
|
-
except Exception as err:
|
|
161
|
-
# Record the exception in the span
|
|
162
|
-
span.record_exception(err)
|
|
163
|
-
|
|
164
|
-
# Set the span status to indicate an error
|
|
165
|
-
span.set_status(Status(StatusCode.ERROR, str(err)))
|
|
166
|
-
|
|
167
|
-
# Reraise the exception to ensure it's not swallowed
|
|
168
|
-
raise
|
|
169
|
-
|
|
170
|
-
return traced_method
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
@silently_fail
|
|
174
|
-
def _set_input_attributes(span, kwargs, attributes):
|
|
175
|
-
for field, value in attributes.model_dump(by_alias=True).items():
|
|
176
|
-
set_span_attribute(span, field, value)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.30"
|
|
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.2.30 → langtrace_python_sdk-2.2.31}/src/examples/chroma_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/chroma_example/basic.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/chat.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/embed.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/rerank.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/cohere_example/tools.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/crewai_example/basic.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.2.30 → langtrace_python_sdk-2.2.31}/src/examples/dspy_example/quiz_gen.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/dspy_example/react.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/fastapi_example/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/gemini_example/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/gemini_example/main.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/hiveagent_example/basic.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/langchain_example/basic.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/langchain_example/tool.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/litellm_example/basic.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/llamaindex_example/agent.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/llamaindex_example/basic.py
RENAMED
|
File without changes
|
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/mistral_example/__init__.py
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.2.30 → langtrace_python_sdk-2.2.31}/src/examples/mistral_example/complete.py
RENAMED
|
File without changes
|
|
File without changes
|