langtrace-python-sdk 3.8.4__tar.gz → 3.8.6__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.
Files changed (311) hide show
  1. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/PKG-INFO +1 -1
  2. langtrace_python_sdk-3.8.6/src/langtrace_python_sdk/instrumentation/agno/patch.py +363 -0
  3. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/openai_agents/patch.py +36 -8
  4. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/llm.py +151 -1
  5. langtrace_python_sdk-3.8.6/src/langtrace_python_sdk/version.py +1 -0
  6. langtrace_python_sdk-3.8.4/src/langtrace_python_sdk/instrumentation/agno/patch.py +0 -315
  7. langtrace_python_sdk-3.8.4/src/langtrace_python_sdk/version.py +0 -1
  8. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/.gitignore +0 -0
  9. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/LICENSE +0 -0
  10. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/README.md +0 -0
  11. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/pyproject.toml +0 -0
  12. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/__init__.py +0 -0
  13. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/__init__.py +0 -0
  14. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/anthropic_example/__init__.py +0 -0
  15. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/anthropic_example/completion.py +0 -0
  16. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/autogen_example/__init__.py +0 -0
  17. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/autogen_example/main.py +0 -0
  18. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/awsbedrock_examples/__init__.py +0 -0
  19. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/awsbedrock_examples/converse.py +0 -0
  20. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/azureopenai_example/__init__.py +0 -0
  21. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/azureopenai_example/completion.py +0 -0
  22. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cerebras_example/__init__.py +0 -0
  23. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cerebras_example/main.py +0 -0
  24. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/chroma_example/__init__.py +0 -0
  25. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/chroma_example/basic.py +0 -0
  26. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cleanlab_example/simple.py +0 -0
  27. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/__init__.py +0 -0
  28. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/chat.py +0 -0
  29. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/chat_stream.py +0 -0
  30. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/chat_streamv2.py +0 -0
  31. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/chatv2.py +0 -0
  32. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/embed.py +0 -0
  33. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/rerank.py +0 -0
  34. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/rerankv2.py +0 -0
  35. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/cohere_example/tools.py +0 -0
  36. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/__init__.py +0 -0
  37. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/basic.py +0 -0
  38. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/instagram_post/__init__.py +0 -0
  39. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/instagram_post/agents.py +0 -0
  40. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/instagram_post/main.py +0 -0
  41. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/instagram_post/tasks.py +0 -0
  42. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/instagram_post/tools/__init__.py +0 -0
  43. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/instagram_post/tools/browser_tools.py +0 -0
  44. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/simple_agent/__init__.py +0 -0
  45. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/simple_agent/agents.py +0 -0
  46. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/simple_agent/main.py +0 -0
  47. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/simple_agent/tasks.py +0 -0
  48. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/trip_planner/__init__.py +0 -0
  49. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/trip_planner/agents.py +0 -0
  50. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/trip_planner/main.py +0 -0
  51. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/trip_planner/tasks.py +0 -0
  52. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/trip_planner/tools/calculator.py +0 -0
  53. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/crewai_example/trip_planner/tools/search_tools.py +0 -0
  54. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/QA_basic.py +0 -0
  55. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/QA_basic_with_chain_of_thought.py +0 -0
  56. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/QA_basic_with_signature.py +0 -0
  57. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/QA_multi_step_with_chain_of_thought.py +0 -0
  58. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/math_problems_cot.py +0 -0
  59. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/math_problems_cot_parallel.py +0 -0
  60. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/optimizers/bootstrap_fewshot.py +0 -0
  61. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/program_of_thought_basic.py +0 -0
  62. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/quiz_gen.py +0 -0
  63. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/dspy_example/react.py +0 -0
  64. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/embedchain_example/simple.py +0 -0
  65. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/fastapi_example/__init__.py +0 -0
  66. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/fastapi_example/basic_route.py +0 -0
  67. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/gemini_example/__init__.py +0 -0
  68. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/gemini_example/function_tools.py +0 -0
  69. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/gemini_example/main.py +0 -0
  70. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/google_genai_example/__init__.py +0 -0
  71. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/google_genai_example/main.py +0 -0
  72. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/graphlit_example/__init__.py +0 -0
  73. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/graphlit_example/conversation.py +0 -0
  74. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/hiveagent_example/basic.py +0 -0
  75. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/inspect_ai_example/basic_eval.py +0 -0
  76. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langchain_example/__init__.py +0 -0
  77. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langchain_example/basic.py +0 -0
  78. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langchain_example/groq_example.py +0 -0
  79. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langchain_example/langchain_google_example.py +0 -0
  80. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langchain_example/langgraph_example.py +0 -0
  81. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langchain_example/langgraph_example_tools.py +0 -0
  82. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langchain_example/sagemaker.py +0 -0
  83. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langchain_example/tool.py +0 -0
  84. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/langgraph_example/main.py +0 -0
  85. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/litellm_example/basic.py +0 -0
  86. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/litellm_example/config.yaml +0 -0
  87. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/litellm_example/proxy_basic.py +0 -0
  88. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/llamaindex_example/__init__.py +0 -0
  89. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/llamaindex_example/agent.py +0 -0
  90. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/llamaindex_example/basic.py +0 -0
  91. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/llamaindex_example/data/abramov.txt +0 -0
  92. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/milvus_example/main.py +0 -0
  93. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/mistral_example/__init__.py +0 -0
  94. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/mistral_example/complete.py +0 -0
  95. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/mistral_example/complete_async.py +0 -0
  96. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/mistral_example/embeddings.py +0 -0
  97. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/mongo_vector_search_example/main.py +0 -0
  98. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/ollama_example/__init__.py +0 -0
  99. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/ollama_example/basic.py +0 -0
  100. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/__init__.py +0 -0
  101. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/async_tool_calling_nonstreaming.py +0 -0
  102. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/async_tool_calling_streaming.py +0 -0
  103. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/chat_completion.py +0 -0
  104. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/chat_completion_tool_choice.py +0 -0
  105. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/embeddings_create.py +0 -0
  106. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/function_calling.py +0 -0
  107. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/images_edit.py +0 -0
  108. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/images_generate.py +0 -0
  109. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/resources/lounge_flamingo.png +0 -0
  110. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/resources/mask.png +0 -0
  111. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/send_user_feedback.py +0 -0
  112. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/tool_calling.py +0 -0
  113. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
  114. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/openai_example/tool_calling_streaming.py +0 -0
  115. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/otlp_example/otlp_basic.py +0 -0
  116. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/otlp_example/otlp_with_langtrace.py +0 -0
  117. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/perplexity_example/basic.py +0 -0
  118. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/phidata_example/__init__.py +0 -0
  119. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/phidata_example/agent.py +0 -0
  120. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/pinecone_example/__init__.py +0 -0
  121. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/pinecone_example/basic.py +0 -0
  122. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/qdrant_example/__init__.py +0 -0
  123. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/qdrant_example/basic.py +0 -0
  124. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/routellm_example/basic.py +0 -0
  125. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/vertexai_example/__init__.py +0 -0
  126. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/vertexai_example/main.py +0 -0
  127. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/weaviate_example/__init__.py +0 -0
  128. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/examples/weaviate_example/query_text.py +0 -0
  129. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/__init__.py +0 -0
  130. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/__init__.py +0 -0
  131. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
  132. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
  133. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +0 -0
  134. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/aws_bedrock.py +0 -0
  135. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
  136. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
  137. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/common.py +0 -0
  138. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/embedchain.py +0 -0
  139. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/gemini.py +0 -0
  140. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
  141. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/litellm.py +0 -0
  142. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/milvus.py +0 -0
  143. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/mistral.py +0 -0
  144. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/ollama.py +0 -0
  145. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
  146. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
  147. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/pymongo.py +0 -0
  148. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
  149. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/vertexai.py +0 -0
  150. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +0 -0
  151. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/extensions/__init__.py +0 -0
  152. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
  153. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/extensions/langtrace_filesystem.py +0 -0
  154. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/__init__.py +0 -0
  155. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/agno/__init__.py +0 -0
  156. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/agno/instrumentation.py +0 -0
  157. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
  158. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +0 -0
  159. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -0
  160. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/anthropic/types.py +0 -0
  161. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/autogen/__init__.py +0 -0
  162. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/autogen/instrumentation.py +0 -0
  163. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/autogen/patch.py +0 -0
  164. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/aws_bedrock/__init__.py +0 -0
  165. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/aws_bedrock/bedrock_streaming_wrapper.py +0 -0
  166. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/aws_bedrock/instrumentation.py +0 -0
  167. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/aws_bedrock/patch.py +0 -0
  168. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/aws_bedrock/stream_body_wrapper.py +0 -0
  169. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cerebras/__init__.py +0 -0
  170. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cerebras/instrumentation.py +0 -0
  171. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cerebras/patch.py +0 -0
  172. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
  173. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
  174. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -0
  175. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cleanlab/__init__.py +0 -0
  176. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cleanlab/instrumentation.py +0 -0
  177. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cleanlab/patch.py +0 -0
  178. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
  179. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
  180. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
  181. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/crewai/__init__.py +0 -0
  182. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/crewai/instrumentation.py +0 -0
  183. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/crewai/patch.py +0 -0
  184. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/crewai_tools/__init__.py +0 -0
  185. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/crewai_tools/instrumentation.py +0 -0
  186. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/crewai_tools/patch.py +0 -0
  187. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/dspy/__init__.py +0 -0
  188. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/dspy/instrumentation.py +0 -0
  189. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/dspy/patch.py +0 -0
  190. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/embedchain/__init__.py +0 -0
  191. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/embedchain/instrumentation.py +0 -0
  192. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/embedchain/patch.py +0 -0
  193. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/gemini/__init__.py +0 -0
  194. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/gemini/instrumentation.py +0 -0
  195. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/gemini/patch.py +0 -0
  196. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/google_genai/__init__.py +0 -0
  197. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/google_genai/instrumentation.py +0 -0
  198. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/google_genai/patch.py +0 -0
  199. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/graphlit/__init__.py +0 -0
  200. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/graphlit/instrumentation.py +0 -0
  201. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/graphlit/patch.py +0 -0
  202. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
  203. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
  204. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
  205. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
  206. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +0 -0
  207. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
  208. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
  209. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
  210. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
  211. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
  212. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +0 -0
  213. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +0 -0
  214. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
  215. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
  216. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
  217. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/litellm/__init__.py +0 -0
  218. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/litellm/instrumentation.py +0 -0
  219. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/litellm/patch.py +0 -0
  220. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/litellm/types.py +0 -0
  221. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
  222. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
  223. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
  224. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/milvus/__init__.py +0 -0
  225. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/milvus/instrumentation.py +0 -0
  226. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/milvus/patch.py +0 -0
  227. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/mistral/__init__.py +0 -0
  228. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/mistral/instrumentation.py +0 -0
  229. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/mistral/patch.py +0 -0
  230. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/ollama/__init__.py +0 -0
  231. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/ollama/instrumentation.py +0 -0
  232. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/ollama/patch.py +0 -0
  233. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
  234. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
  235. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/openai/patch.py +0 -0
  236. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/openai/types.py +0 -0
  237. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/openai_agents/__init__.py +0 -0
  238. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/openai_agents/instrumentation.py +0 -0
  239. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/phidata/__init__.py +0 -0
  240. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/phidata/instrumentation.py +0 -0
  241. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/phidata/patch.py +0 -0
  242. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
  243. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
  244. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +0 -0
  245. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/pymongo/__init__.py +0 -0
  246. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/pymongo/instrumentation.py +0 -0
  247. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/pymongo/patch.py +0 -0
  248. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
  249. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
  250. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +0 -0
  251. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/vertexai/__init__.py +0 -0
  252. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/vertexai/instrumentation.py +0 -0
  253. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/vertexai/patch.py +0 -0
  254. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/weaviate/__init__.py +0 -0
  255. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +0 -0
  256. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +0 -0
  257. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/langtrace.py +0 -0
  258. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/types/__init__.py +0 -0
  259. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/__init__.py +0 -0
  260. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/langtrace_sampler.py +0 -0
  261. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/misc.py +0 -0
  262. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
  263. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/sdk_version_checker.py +0 -0
  264. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
  265. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/types.py +0 -0
  266. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/langtrace_python_sdk/utils/with_root_span.py +0 -0
  267. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/run_example.py +0 -0
  268. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/__init__.py +0 -0
  269. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
  270. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
  271. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
  272. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/anthropic/conftest.py +0 -0
  273. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/anthropic/test_anthropic.py +0 -0
  274. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/chroma/conftest.py +0 -0
  275. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/chroma/test_chroma.py +0 -0
  276. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/cohere/cassettes/test_cohere_chat.yaml +0 -0
  277. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +0 -0
  278. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -0
  279. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +0 -0
  280. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/cohere/conftest.py +0 -0
  281. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/cohere/test_cohere_chat.py +0 -0
  282. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/cohere/test_cohere_embed.py +0 -0
  283. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/cohere/test_cohere_rerank.py +0 -0
  284. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/conftest.py +0 -0
  285. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/groq/cassettes/test_async_chat_completion.yaml +0 -0
  286. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/groq/cassettes/test_async_chat_completion_streaming.yaml +0 -0
  287. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/groq/cassettes/test_chat_completion.yaml +0 -0
  288. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/groq/cassettes/test_chat_completion_streaming.yaml +0 -0
  289. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/groq/conftest.py +0 -0
  290. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/groq/test_groq.py +0 -0
  291. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/langchain/cassettes/test_langchain.yaml +0 -0
  292. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/langchain/conftest.py +0 -0
  293. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/langchain/test_langchain.py +0 -0
  294. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +0 -0
  295. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
  296. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
  297. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -0
  298. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/cassettes/test_embeddings_base_url.yaml +0 -0
  299. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
  300. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/conftest.py +0 -0
  301. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/test_chat_completion.py +0 -0
  302. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/test_embeddings.py +0 -0
  303. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/openai/test_image_generation.py +0 -0
  304. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
  305. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
  306. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/pinecone/conftest.py +0 -0
  307. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/pinecone/test_pinecone.py +0 -0
  308. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/qdrant/conftest.py +0 -0
  309. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/qdrant/test_qdrant.py +0 -0
  310. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/test_session_id.py +0 -0
  311. {langtrace_python_sdk-3.8.4 → langtrace_python_sdk-3.8.6}/src/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langtrace-python-sdk
3
- Version: 3.8.4
3
+ Version: 3.8.6
4
4
  Summary: Python SDK for LangTrace
5
5
  Project-URL: Homepage, https://github.com/Scale3-Labs/langtrace-python-sdk
6
6
  Author-email: Scale3 Labs <engineering@scale3labs.com>
@@ -0,0 +1,363 @@
1
+ """
2
+ Copyright (c) 2025 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
+ import json
18
+ import time
19
+ from typing import Any
20
+
21
+ from importlib_metadata import version as v
22
+ from langtrace.trace_attributes import FrameworkSpanAttributes
23
+ from opentelemetry import baggage
24
+ from opentelemetry.trace import Span, SpanKind, Tracer
25
+ from opentelemetry.trace.status import Status, StatusCode
26
+
27
+ from langtrace_python_sdk.constants import LANGTRACE_SDK_NAME
28
+ from langtrace_python_sdk.constants.instrumentation.common import (
29
+ LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY,
30
+ SERVICE_PROVIDERS,
31
+ )
32
+ from langtrace_python_sdk.utils import set_span_attribute
33
+ from langtrace_python_sdk.utils.llm import get_span_name, set_span_attributes
34
+ from langtrace_python_sdk.utils.misc import serialize_args, serialize_kwargs
35
+
36
+
37
+ def patch_agent(operation_name, version, tracer: Tracer):
38
+ def traced_method(wrapped, instance, args, kwargs):
39
+ service_provider = SERVICE_PROVIDERS.get("AGNO", "agno")
40
+ extra_attributes = baggage.get_baggage(LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY)
41
+
42
+ span_attributes = {
43
+ "langtrace.sdk.name": "langtrace-python-sdk",
44
+ "langtrace.service.name": service_provider,
45
+ "langtrace.service.type": "framework",
46
+ "langtrace.service.version": version,
47
+ "langtrace.version": v(LANGTRACE_SDK_NAME),
48
+ **(extra_attributes if extra_attributes is not None else {}),
49
+ }
50
+
51
+ inputs = {}
52
+ if len(args) > 0:
53
+ inputs["args"] = serialize_args(*args)
54
+ if len(kwargs) > 0:
55
+ inputs["kwargs"] = serialize_kwargs(**kwargs)
56
+ span_attributes["agno.agent.inputs"] = json.dumps(inputs)
57
+ attributes = FrameworkSpanAttributes(**span_attributes)
58
+
59
+ with tracer.start_as_current_span(
60
+ get_span_name(operation_name), kind=SpanKind.CLIENT
61
+ ) as span:
62
+ try:
63
+ set_span_attributes(span, attributes)
64
+ AgnoSpanAttributes(span=span, instance=instance)
65
+
66
+ result = wrapped(*args, **kwargs)
67
+
68
+ span.set_status(Status(StatusCode.OK))
69
+
70
+ if operation_name in ["Agent._run", "Agent._arun", "Agent.run", "Agent.arun", "Agent.print_response"]:
71
+ try:
72
+ if hasattr(instance, "run_response") and instance.run_response:
73
+ if hasattr(instance.run_response, "run_id") and instance.run_response.run_id:
74
+ set_span_attribute(span, "agno.agent.run_id", instance.run_response.run_id)
75
+
76
+ if hasattr(instance.run_response, "created_at") and instance.run_response.created_at:
77
+ set_span_attribute(span, "agno.agent.timestamp", instance.run_response.created_at)
78
+
79
+ if hasattr(instance.run_response, "content") and instance.run_response.content:
80
+ content = str(instance.run_response.content)
81
+ set_span_attribute(span, "agno.agent.response_content", content)
82
+
83
+ # Capture any tools that were used
84
+ if hasattr(instance.run_response, "tools") and instance.run_response.tools:
85
+ tools = instance.run_response.tools
86
+ tool_summary = []
87
+ for tool in tools:
88
+ if 'tool_name' in tool:
89
+ tool_summary.append(tool['tool_name'])
90
+ elif 'function' in tool and 'name' in tool['function']:
91
+ tool_summary.append(tool['function']['name'])
92
+ set_span_attribute(span, "agno.agent.tools_used", json.dumps(tool_summary))
93
+
94
+ if hasattr(instance.run_response, "metrics") and instance.run_response.metrics:
95
+ metrics = instance.run_response.metrics
96
+ for metric_name, metric_values in metrics.items():
97
+ if isinstance(metric_values, list):
98
+
99
+ if all(isinstance(v, (int, float)) for v in metric_values):
100
+ set_span_attribute(
101
+ span,
102
+ f"agno.agent.metrics.{metric_name}",
103
+ sum(metric_values) / len(metric_values) if metric_values else 0
104
+ )
105
+ elif len(metric_values) > 0:
106
+ set_span_attribute(
107
+ span,
108
+ f"agno.agent.metrics.{metric_name}",
109
+ str(metric_values[-1])
110
+ )
111
+ else:
112
+ set_span_attribute(
113
+ span,
114
+ f"agno.agent.metrics.{metric_name}",
115
+ str(metric_values)
116
+ )
117
+
118
+ if 'input_tokens' in metrics:
119
+ if isinstance(metrics['input_tokens'], list) and metrics['input_tokens']:
120
+ set_span_attribute(span, "agno.agent.token_usage.input",
121
+ sum(metrics['input_tokens']))
122
+ else:
123
+ set_span_attribute(span, "agno.agent.token_usage.input",
124
+ metrics['input_tokens'])
125
+
126
+ if 'output_tokens' in metrics:
127
+ if isinstance(metrics['output_tokens'], list) and metrics['output_tokens']:
128
+ set_span_attribute(span, "agno.agent.token_usage.output",
129
+ sum(metrics['output_tokens']))
130
+ else:
131
+ set_span_attribute(span, "agno.agent.token_usage.output",
132
+ metrics['output_tokens'])
133
+
134
+ if 'total_tokens' in metrics:
135
+ if isinstance(metrics['total_tokens'], list) and metrics['total_tokens']:
136
+ set_span_attribute(span, "agno.agent.token_usage.total",
137
+ sum(metrics['total_tokens']))
138
+ else:
139
+ set_span_attribute(span, "agno.agent.token_usage.total",
140
+ metrics['total_tokens'])
141
+ except Exception as err:
142
+ set_span_attribute(span, "agno.agent.run_response_error", str(err))
143
+
144
+ return result
145
+
146
+ except Exception as err:
147
+ span.record_exception(err)
148
+ span.set_status(Status(StatusCode.ERROR, str(err)))
149
+ raise
150
+
151
+ return traced_method
152
+
153
+
154
+ def patch_memory(operation_name, version, tracer: Tracer):
155
+ """
156
+ Apply instrumentation patches to AgentMemory class methods.
157
+
158
+ Args:
159
+ operation_name: The name of the operation
160
+ version: The version of Agno
161
+ tracer: The OpenTelemetry tracer
162
+ """
163
+ def traced_method(wrapped, instance, args, kwargs):
164
+ service_provider = SERVICE_PROVIDERS.get("AGNO", "agno")
165
+ extra_attributes = baggage.get_baggage(LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY)
166
+
167
+ # Collect basic span attributes
168
+ span_attributes = {
169
+ "langtrace.sdk.name": "langtrace-python-sdk",
170
+ "langtrace.service.name": service_provider,
171
+ "langtrace.service.type": "framework",
172
+ "langtrace.service.version": version,
173
+ "langtrace.version": v(LANGTRACE_SDK_NAME),
174
+ **(extra_attributes if extra_attributes is not None else {}),
175
+ }
176
+
177
+ # Collect inputs
178
+ inputs = {}
179
+ if len(args) > 0:
180
+ inputs["args"] = serialize_args(*args)
181
+ if len(kwargs) > 0:
182
+ inputs["kwargs"] = serialize_kwargs(**kwargs)
183
+
184
+ span_attributes["agno.memory.inputs"] = json.dumps(inputs)
185
+
186
+ if hasattr(instance, "messages"):
187
+ span_attributes["agno.memory.messages_count_before"] = len(instance.messages)
188
+ if hasattr(instance, "runs"):
189
+ span_attributes["agno.memory.runs_count_before"] = len(instance.runs)
190
+ if hasattr(instance, "memories") and instance.memories:
191
+ span_attributes["agno.memory.memories_count_before"] = len(instance.memories)
192
+
193
+ attributes = FrameworkSpanAttributes(**span_attributes)
194
+
195
+ with tracer.start_as_current_span(
196
+ get_span_name(operation_name), kind=SpanKind.CLIENT
197
+ ) as span:
198
+ start_time = time.time()
199
+ try:
200
+ # Set attributes
201
+ set_span_attributes(span, attributes)
202
+
203
+ # Execute the wrapped method
204
+ result = wrapped(*args, **kwargs)
205
+
206
+ # Add memory stats after operation
207
+ if hasattr(instance, "messages"):
208
+ set_span_attribute(span, "agno.memory.messages_count_after", len(instance.messages))
209
+ if hasattr(instance, "runs"):
210
+ set_span_attribute(span, "agno.memory.runs_count_after", len(instance.runs))
211
+ if hasattr(instance, "memories") and instance.memories:
212
+ set_span_attribute(span, "agno.memory.memories_count_after", len(instance.memories))
213
+
214
+ # Record execution time
215
+ set_span_attribute(span, "agno.memory.execution_time_ms", int((time.time() - start_time) * 1000))
216
+
217
+ # Record success status
218
+ span.set_status(Status(StatusCode.OK))
219
+
220
+ # Add result if relevant
221
+ if result is not None:
222
+ set_span_attribute(span, "agno.memory.result", str(result))
223
+
224
+ return result
225
+
226
+ except Exception as err:
227
+ # Record the exception
228
+ span.record_exception(err)
229
+ span.set_status(Status(StatusCode.ERROR, str(err)))
230
+ raise
231
+
232
+ return traced_method
233
+
234
+
235
+ class AgnoSpanAttributes:
236
+ """
237
+ Helper class to extract and set Agno Agent attributes on spans.
238
+ """
239
+
240
+ def __init__(self, span: Span, instance: Any) -> None:
241
+ """
242
+ Initialize with a span and Agno instance.
243
+
244
+ Args:
245
+ span: OpenTelemetry span to update
246
+ instance: Agno Agent instance
247
+ """
248
+ self.span = span
249
+ self.instance = instance
250
+ self.agent_data = {}
251
+
252
+ self.run()
253
+
254
+ def run(self) -> None:
255
+ """Process the instance attributes and add them to the span."""
256
+ # Collect basic agent attributes
257
+ self.collect_agent_attributes()
258
+
259
+ # Add attributes to span
260
+ for key, value in self.agent_data.items():
261
+ if value is not None:
262
+ set_span_attribute(
263
+ self.span,
264
+ f"agno.agent.{key}",
265
+ str(value) if not isinstance(value, (int, float, bool)) else value
266
+ )
267
+
268
+ def collect_agent_attributes(self) -> None:
269
+ """Collect important attributes from the Agent instance."""
270
+ # Extract basic agent information
271
+ if hasattr(self.instance, "agent_id"):
272
+ self.agent_data["id"] = self.instance.agent_id
273
+
274
+ if hasattr(self.instance, "name"):
275
+ self.agent_data["name"] = self.instance.name
276
+
277
+ if hasattr(self.instance, "session_id"):
278
+ self.agent_data["session_id"] = self.instance.session_id
279
+
280
+ if hasattr(self.instance, "user_id"):
281
+ self.agent_data["user_id"] = self.instance.user_id
282
+
283
+ if hasattr(self.instance, "run_id"):
284
+ self.agent_data["run_id"] = self.instance.run_id
285
+
286
+ # Extract model information
287
+ if hasattr(self.instance, "model") and self.instance.model:
288
+ model = self.instance.model
289
+ model_info = {}
290
+
291
+ if hasattr(model, "id"):
292
+ model_info["id"] = model.id
293
+
294
+ if hasattr(model, "name"):
295
+ model_info["name"] = model.name
296
+
297
+ if hasattr(model, "provider"):
298
+ model_info["provider"] = model.provider
299
+
300
+ # Add temperature if available
301
+ if hasattr(model, "temperature") and model.temperature is not None:
302
+ model_info["temperature"] = model.temperature
303
+
304
+ # Add max_tokens if available
305
+ if hasattr(model, "max_tokens") and model.max_tokens is not None:
306
+ model_info["max_tokens"] = model.max_tokens
307
+
308
+ self.agent_data["model"] = json.dumps(model_info)
309
+
310
+ # Extract tool information
311
+ if hasattr(self.instance, "tools") and self.instance.tools:
312
+ tool_info = []
313
+ for tool in self.instance.tools:
314
+ tool_data = {}
315
+
316
+ # Handle different types of tools
317
+ if hasattr(tool, "name"):
318
+ tool_data["name"] = tool.name
319
+
320
+ # Handle DuckDuckGoTools and similar toolkits
321
+ if hasattr(tool, "functions") and isinstance(tool.functions, dict):
322
+ tool_data["functions"] = list(tool.functions.keys())
323
+
324
+ elif hasattr(tool, "__name__"):
325
+ tool_data["name"] = tool.__name__
326
+ else:
327
+ tool_data["name"] = str(tool)
328
+
329
+ # Add functions if available
330
+ if not "functions" in tool_data and hasattr(tool, "functions"):
331
+ if callable(getattr(tool, "functions")):
332
+ try:
333
+ tool_functions = tool.functions()
334
+ if isinstance(tool_functions, list):
335
+ tool_data["functions"] = [f.__name__ if hasattr(f, "__name__") else str(f)
336
+ for f in tool_functions]
337
+ except:
338
+ pass
339
+
340
+ tool_info.append(tool_data)
341
+
342
+ self.agent_data["tools"] = json.dumps(tool_info)
343
+
344
+ # Extract reasoning settings
345
+ if hasattr(self.instance, "reasoning") and self.instance.reasoning:
346
+ self.agent_data["reasoning_enabled"] = True
347
+
348
+ if hasattr(self.instance, "reasoning_model") and self.instance.reasoning_model:
349
+ self.agent_data["reasoning_model"] = str(self.instance.reasoning_model.id)
350
+
351
+ if hasattr(self.instance, "reasoning_min_steps"):
352
+ self.agent_data["reasoning_min_steps"] = self.instance.reasoning_min_steps
353
+
354
+ if hasattr(self.instance, "reasoning_max_steps"):
355
+ self.agent_data["reasoning_max_steps"] = self.instance.reasoning_max_steps
356
+
357
+ # Extract knowledge settings
358
+ if hasattr(self.instance, "knowledge") and self.instance.knowledge:
359
+ self.agent_data["knowledge_enabled"] = True
360
+
361
+ # Extract streaming settings
362
+ if hasattr(self.instance, "stream"):
363
+ self.agent_data["stream"] = self.instance.stream
@@ -1,9 +1,6 @@
1
1
  import json
2
2
  from typing import Any, Callable, List
3
3
 
4
- from agents.exceptions import (InputGuardrailTripwireTriggered,
5
- OutputGuardrailTripwireTriggered)
6
- from agents.run import Runner
7
4
  from importlib_metadata import version as v
8
5
  from langtrace.trace_attributes import FrameworkSpanAttributes, SpanAttributes
9
6
  from opentelemetry import baggage, trace
@@ -18,6 +15,29 @@ from langtrace_python_sdk.utils.llm import (set_event_completion,
18
15
  set_usage_attributes)
19
16
 
20
17
 
18
+ # Define dummy classes to use when imports fail
19
+ class DummyRunner:
20
+ pass
21
+
22
+
23
+ class DummyException(Exception):
24
+ pass
25
+
26
+
27
+ # Try importing from openai-agents package
28
+ try:
29
+ from agents.exceptions import (InputGuardrailTripwireTriggered,
30
+ OutputGuardrailTripwireTriggered)
31
+ from agents.run import Runner
32
+ OPENAI_AGENTS_AVAILABLE = True
33
+ except ImportError:
34
+ # Define dummy classes if imports fail
35
+ InputGuardrailTripwireTriggered = DummyException
36
+ OutputGuardrailTripwireTriggered = DummyException
37
+ Runner = DummyRunner
38
+ OPENAI_AGENTS_AVAILABLE = False
39
+
40
+
21
41
  def extract_agent_details(agent_or_handoff):
22
42
  """Extract relevant details from an agent/handoff and its handoffs."""
23
43
  try:
@@ -70,6 +90,10 @@ def extract_handoff_details(handoff):
70
90
 
71
91
  def get_handoffs(version: str, tracer: Tracer) -> Callable:
72
92
  """Wrap the `prompt` method of the `TLM` class to trace it."""
93
+ if not OPENAI_AGENTS_AVAILABLE:
94
+ def noop_traced_method(wrapped: Callable, instance: Any, args: List[Any], kwargs: Any) -> Any:
95
+ return wrapped(*args, **kwargs)
96
+ return noop_traced_method
73
97
 
74
98
  def traced_method(
75
99
  wrapped: Callable,
@@ -117,7 +141,8 @@ def get_handoffs(version: str, tracer: Tracer) -> Callable:
117
141
  attributes = FrameworkSpanAttributes(**span_attributes)
118
142
 
119
143
  with tracer.start_as_current_span(
120
- name=f"openai_agents.available_handoffs", kind=SpanKind.CLIENT
144
+ name="openai_agents.available_handoffs",
145
+ kind=SpanKind.CLIENT
121
146
  ) as span:
122
147
  try:
123
148
  set_span_attributes(span, attributes)
@@ -157,12 +182,11 @@ def get_handoffs(version: str, tracer: Tracer) -> Callable:
157
182
  pass # Silently fail if error recording fails
158
183
  raise # Re-raise the original error since it's from the wrapped function
159
184
 
160
- except Exception as outer_err:
161
- # If anything fails in our instrumentation wrapper, catch it and return control to the wrapped function
185
+ except Exception:
162
186
  try:
163
187
  return wrapped(*args, **kwargs)
164
188
  except Exception as wrapped_err:
165
- raise wrapped_err # Only raise errors from the wrapped function
189
+ raise wrapped_err
166
190
 
167
191
  return traced_method
168
192
 
@@ -328,6 +352,10 @@ def extract_run_config(config):
328
352
 
329
353
  def get_new_response(version: str, tracer: Tracer) -> Callable:
330
354
  """Wrap the _get_new_response method to trace inputs and outputs."""
355
+ if not OPENAI_AGENTS_AVAILABLE:
356
+ async def noop_traced_method(wrapped: Callable, instance: Any, args: List[Any], kwargs: Any) -> Any:
357
+ return await wrapped(*args, **kwargs)
358
+ return noop_traced_method
331
359
 
332
360
  async def traced_method(
333
361
  wrapped: Callable,
@@ -524,7 +552,7 @@ def get_new_response(version: str, tracer: Tracer) -> Callable:
524
552
 
525
553
  raise
526
554
 
527
- except Exception as outer_err:
555
+ except Exception: # Remove outer_err since it's unused
528
556
  try:
529
557
  return await wrapped(*args, **kwargs)
530
558
  except Exception as wrapped_err:
@@ -94,6 +94,139 @@ def calculate_price_from_usage(model, usage):
94
94
  return 0
95
95
 
96
96
 
97
+ def convert_mistral_messages_to_serializable(mistral_messages):
98
+ serializable_messages = []
99
+
100
+ try:
101
+ for message in mistral_messages:
102
+ serializable_message = {"role": message.role}
103
+
104
+ # Handle content
105
+ if hasattr(message, "content"):
106
+ serializable_message["content"] = message.content
107
+
108
+ # Handle tool_calls
109
+ if hasattr(message, "tool_calls") and message.tool_calls is not None:
110
+ serializable_tool_calls = []
111
+
112
+ for tool_call in message.tool_calls:
113
+ serializable_tool_call = {}
114
+
115
+ # Handle id, type, and index
116
+ if hasattr(tool_call, "id"):
117
+ serializable_tool_call["id"] = tool_call.id
118
+ if hasattr(tool_call, "type"):
119
+ serializable_tool_call["type"] = tool_call.type
120
+ if hasattr(tool_call, "index"):
121
+ serializable_tool_call["index"] = tool_call.index
122
+
123
+ # Handle function
124
+ if hasattr(tool_call, "function"):
125
+ function_call = tool_call.function
126
+ serializable_function = {}
127
+
128
+ if hasattr(function_call, "name"):
129
+ serializable_function["name"] = function_call.name
130
+ if hasattr(function_call, "arguments"):
131
+ serializable_function["arguments"] = function_call.arguments
132
+
133
+ serializable_tool_call["function"] = serializable_function
134
+
135
+ serializable_tool_calls.append(serializable_tool_call)
136
+
137
+ serializable_message["tool_calls"] = serializable_tool_calls
138
+
139
+ # Handle tool_call_id for tool messages
140
+ if hasattr(message, "tool_call_id"):
141
+ serializable_message["tool_call_id"] = message.tool_call_id
142
+
143
+ serializable_messages.append(serializable_message)
144
+ except Exception as e:
145
+ pass
146
+
147
+ return serializable_messages
148
+
149
+
150
+ def convert_gemini_messages_to_serializable(formatted_messages, system_message=None):
151
+ """
152
+ Converts Gemini-formatted messages back to a JSON serializable format.
153
+
154
+ Args:
155
+ formatted_messages: The formatted messages from Gemini.
156
+ system_message (str, optional): System message content.
157
+
158
+ Returns:
159
+ List[dict]: JSON serializable list of message dictionaries.
160
+ """
161
+ serializable_messages = []
162
+
163
+ try:
164
+ # Add system message if present
165
+ if system_message:
166
+ serializable_messages.append({
167
+ "role": "system",
168
+ "content": system_message
169
+ })
170
+
171
+ for message_item in formatted_messages:
172
+ # Handle the case where the item is a dict with 'role' and 'content' keys
173
+ if isinstance(message_item, dict) and 'role' in message_item and 'content' in message_item:
174
+ role = message_item['role']
175
+ content_value = message_item['content']
176
+
177
+ # Initialize our serializable message
178
+ serializable_message = {"role": role}
179
+
180
+ # If content is a list of Content objects
181
+ if isinstance(content_value, list) and len(content_value) > 0:
182
+ for content_obj in content_value:
183
+ # Process each Content object
184
+ if hasattr(content_obj, 'parts') and hasattr(content_obj, 'role'):
185
+ parts = content_obj.parts
186
+
187
+ # Extract text from parts
188
+ text_parts = []
189
+ for part in parts:
190
+ if hasattr(part, 'text') and part.text:
191
+ text_parts.append(part.text)
192
+
193
+ if text_parts:
194
+ serializable_message["content"] = " ".join(text_parts)
195
+
196
+ # Here you can add additional processing for other part types
197
+ # like function_call, function_response, inline_data, etc.
198
+ # Similar to the previous implementation
199
+
200
+ # If content is a string or already a primitive type
201
+ elif isinstance(content_value, (str, int, float, bool)) or content_value is None:
202
+ serializable_message["content"] = content_value
203
+
204
+ # Add the processed message to our list
205
+ serializable_messages.append(serializable_message)
206
+
207
+ # Handle the case where the item is a Content object directly
208
+ elif hasattr(message_item, 'role') and hasattr(message_item, 'parts'):
209
+ # This is the case from the previous implementation
210
+ # Process a Content object directly
211
+ serializable_message = {"role": message_item.role}
212
+
213
+ parts = message_item.parts
214
+ text_parts = []
215
+
216
+ for part in parts:
217
+ if hasattr(part, 'text') and part.text:
218
+ text_parts.append(part.text)
219
+
220
+ if text_parts:
221
+ serializable_message["content"] = " ".join(text_parts)
222
+
223
+ serializable_messages.append(serializable_message)
224
+ except Exception as e:
225
+ pass
226
+
227
+ return serializable_messages
228
+
229
+
97
230
  def get_langtrace_attributes(version, service_provider, vendor_type="llm"):
98
231
  return {
99
232
  SpanAttributes.LANGTRACE_SDK_NAME: LANGTRACE_SDK_NAME,
@@ -120,6 +253,23 @@ def get_llm_request_attributes(kwargs, prompts=None, model=None, operation_name=
120
253
  or kwargs.get("top_k", None)
121
254
  or kwargs.get("top_n", None)
122
255
  )
256
+
257
+ try:
258
+ prompts = json.dumps(prompts) if prompts else None
259
+ except Exception as e:
260
+ if "is not JSON serializable" in str(e):
261
+ # check model
262
+ if kwargs.get("model") is not None:
263
+ if kwargs.get("model").startswith("gemini"):
264
+ prompts = json.dumps(convert_gemini_messages_to_serializable(prompts))
265
+ elif kwargs.get("model").startswith("mistral"):
266
+ prompts = json.dumps(convert_mistral_messages_to_serializable(prompts))
267
+ else:
268
+ prompts = "[]"
269
+ else:
270
+ prompts = "[]"
271
+ else:
272
+ prompts = "[]"
123
273
 
124
274
  top_p = kwargs.get("p", None) or kwargs.get("top_p", None)
125
275
  tools = kwargs.get("tools", None)
@@ -132,7 +282,7 @@ def get_llm_request_attributes(kwargs, prompts=None, model=None, operation_name=
132
282
  SpanAttributes.LLM_IS_STREAMING: kwargs.get("stream"),
133
283
  SpanAttributes.LLM_REQUEST_TEMPERATURE: kwargs.get("temperature"),
134
284
  SpanAttributes.LLM_TOP_K: top_k,
135
- SpanAttributes.LLM_PROMPTS: json.dumps(prompts) if prompts else None,
285
+ SpanAttributes.LLM_PROMPTS: prompts if prompts else None,
136
286
  SpanAttributes.LLM_USER: user,
137
287
  SpanAttributes.LLM_REQUEST_TOP_P: top_p,
138
288
  SpanAttributes.LLM_REQUEST_MAX_TOKENS: kwargs.get("max_tokens"),
@@ -0,0 +1 @@
1
+ __version__ = "3.8.6"