langtrace-python-sdk 2.3.12__tar.gz → 2.3.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/PKG-INFO +32 -25
  2. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/README.md +30 -24
  3. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/pyproject.toml +1 -0
  4. langtrace_python_sdk-2.3.14/src/examples/autogen_example/__init__.py +8 -0
  5. langtrace_python_sdk-2.3.14/src/examples/autogen_example/main.py +72 -0
  6. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/langchain_example/__init__.py +2 -0
  7. langtrace_python_sdk-2.3.14/src/examples/langchain_example/langchain_google_example.py +29 -0
  8. langtrace_python_sdk-2.3.14/src/langtrace_python_sdk/constants/__init__.py +2 -0
  9. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/common.py +1 -0
  10. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/__init__.py +2 -0
  11. langtrace_python_sdk-2.3.14/src/langtrace_python_sdk/instrumentation/autogen/__init__.py +3 -0
  12. langtrace_python_sdk-2.3.14/src/langtrace_python_sdk/instrumentation/autogen/instrumentation.py +42 -0
  13. langtrace_python_sdk-2.3.14/src/langtrace_python_sdk/instrumentation/autogen/patch.py +132 -0
  14. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +2 -7
  15. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +14 -0
  16. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +38 -17
  17. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +9 -2
  18. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/langtrace.py +28 -2
  19. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/__init__.py +18 -0
  20. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/llm.py +12 -2
  21. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/sdk_version_checker.py +3 -0
  22. langtrace_python_sdk-2.3.14/src/langtrace_python_sdk/version.py +1 -0
  23. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/run_example.py +8 -2
  24. langtrace_python_sdk-2.3.12/src/langtrace_python_sdk/constants/__init__.py +0 -1
  25. langtrace_python_sdk-2.3.12/src/langtrace_python_sdk/version.py +0 -1
  26. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/.gitignore +0 -0
  27. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/LICENSE +0 -0
  28. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/__init__.py +0 -0
  29. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/__init__.py +0 -0
  30. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/anthropic_example/__init__.py +0 -0
  31. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/anthropic_example/completion.py +0 -0
  32. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/azureopenai_example/__init__.py +0 -0
  33. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/azureopenai_example/completion.py +0 -0
  34. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/chroma_example/__init__.py +0 -0
  35. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/chroma_example/basic.py +0 -0
  36. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/cohere_example/__init__.py +0 -0
  37. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/cohere_example/chat.py +0 -0
  38. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/cohere_example/chat_stream.py +0 -0
  39. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/cohere_example/embed.py +0 -0
  40. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/cohere_example/rerank.py +0 -0
  41. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/cohere_example/tools.py +0 -0
  42. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/__init__.py +0 -0
  43. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/basic.py +0 -0
  44. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/instagram_post/__init__.py +0 -0
  45. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/instagram_post/agents.py +0 -0
  46. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/instagram_post/main.py +0 -0
  47. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/instagram_post/tasks.py +0 -0
  48. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/instagram_post/tools/__init__.py +0 -0
  49. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/instagram_post/tools/browser_tools.py +0 -0
  50. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/simple_agent/__init__.py +0 -0
  51. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/simple_agent/agents.py +0 -0
  52. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/simple_agent/main.py +0 -0
  53. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/simple_agent/tasks.py +0 -0
  54. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/trip_planner/__init__.py +0 -0
  55. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/trip_planner/agents.py +0 -0
  56. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/trip_planner/main.py +0 -0
  57. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/trip_planner/tasks.py +0 -0
  58. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/trip_planner/tools/calculator.py +0 -0
  59. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/crewai_example/trip_planner/tools/search_tools.py +0 -0
  60. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/dspy_example/math_problems_cot.py +0 -0
  61. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/dspy_example/math_problems_cot_parallel.py +0 -0
  62. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/dspy_example/program_of_thought_basic.py +0 -0
  63. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/dspy_example/quiz_gen.py +0 -0
  64. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/dspy_example/react.py +0 -0
  65. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/embedchain_example/simple.py +0 -0
  66. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/fastapi_example/__init__.py +0 -0
  67. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/fastapi_example/basic_route.py +0 -0
  68. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/gemini_example/__init__.py +0 -0
  69. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/gemini_example/function_tools.py +0 -0
  70. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/gemini_example/main.py +0 -0
  71. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/hiveagent_example/basic.py +0 -0
  72. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/inspect_ai_example/basic_eval.py +0 -0
  73. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/langchain_example/basic.py +0 -0
  74. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/langchain_example/groq_example.py +0 -0
  75. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/langchain_example/langgraph_example.py +0 -0
  76. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/langchain_example/langgraph_example_tools.py +0 -0
  77. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/langchain_example/sagemaker.py +0 -0
  78. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/langchain_example/tool.py +0 -0
  79. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/litellm_example/basic.py +0 -0
  80. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/llamaindex_example/__init__.py +0 -0
  81. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/llamaindex_example/agent.py +0 -0
  82. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/llamaindex_example/basic.py +0 -0
  83. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/llamaindex_example/data/abramov.txt +0 -0
  84. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/mistral_example/__init__.py +0 -0
  85. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/mistral_example/complete.py +0 -0
  86. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/mistral_example/complete_async.py +0 -0
  87. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/mistral_example/embeddings.py +0 -0
  88. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/ollama_example/__init__.py +0 -0
  89. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/ollama_example/basic.py +0 -0
  90. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/__init__.py +0 -0
  91. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/async_tool_calling_nonstreaming.py +0 -0
  92. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/async_tool_calling_streaming.py +0 -0
  93. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/chat_completion.py +0 -0
  94. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/chat_completion_tool_choice.py +0 -0
  95. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/embeddings_create.py +0 -0
  96. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/function_calling.py +0 -0
  97. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/images_edit.py +0 -0
  98. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/images_generate.py +0 -0
  99. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/resources/lounge_flamingo.png +0 -0
  100. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/resources/mask.png +0 -0
  101. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/send_user_feedback.py +0 -0
  102. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/tool_calling.py +0 -0
  103. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
  104. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/openai_example/tool_calling_streaming.py +0 -0
  105. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/otlp_example/otlp_basic.py +0 -0
  106. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/otlp_example/otlp_with_langtrace.py +0 -0
  107. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/perplexity_example/basic.py +0 -0
  108. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/pinecone_example/__init__.py +0 -0
  109. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/pinecone_example/basic.py +0 -0
  110. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/qdrant_example/__init__.py +0 -0
  111. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/qdrant_example/basic.py +0 -0
  112. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/routellm_example/basic.py +0 -0
  113. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/vertexai_example/__init__.py +0 -0
  114. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/vertexai_example/main.py +0 -0
  115. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/weaviate_example/__init__.py +0 -0
  116. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/examples/weaviate_example/query_text.py +0 -0
  117. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/__init__.py +0 -0
  118. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
  119. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
  120. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +0 -0
  121. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
  122. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
  123. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/embedchain.py +0 -0
  124. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/gemini.py +0 -0
  125. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
  126. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/mistral.py +0 -0
  127. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/ollama.py +0 -0
  128. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
  129. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
  130. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
  131. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/vertexai.py +0 -0
  132. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +0 -0
  133. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/extensions/__init__.py +0 -0
  134. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
  135. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/extensions/langtrace_filesystem.py +0 -0
  136. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
  137. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +0 -0
  138. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -0
  139. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/anthropic/types.py +0 -0
  140. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
  141. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
  142. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -0
  143. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
  144. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
  145. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
  146. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/crewai/__init__.py +0 -0
  147. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/crewai/instrumentation.py +0 -0
  148. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/crewai/patch.py +0 -0
  149. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/dspy/__init__.py +0 -0
  150. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/dspy/instrumentation.py +0 -0
  151. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/dspy/patch.py +0 -0
  152. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/embedchain/__init__.py +0 -0
  153. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/embedchain/instrumentation.py +0 -0
  154. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/embedchain/patch.py +0 -0
  155. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/gemini/__init__.py +0 -0
  156. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/gemini/instrumentation.py +0 -0
  157. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/gemini/patch.py +0 -0
  158. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
  159. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
  160. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
  161. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
  162. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
  163. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
  164. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
  165. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
  166. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
  167. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
  168. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
  169. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
  170. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
  171. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
  172. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
  173. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/mistral/__init__.py +0 -0
  174. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/mistral/instrumentation.py +0 -0
  175. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/mistral/patch.py +0 -0
  176. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/ollama/__init__.py +0 -0
  177. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/ollama/instrumentation.py +0 -0
  178. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/ollama/patch.py +0 -0
  179. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
  180. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
  181. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/openai/patch.py +0 -0
  182. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/openai/types.py +0 -0
  183. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
  184. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
  185. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +0 -0
  186. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
  187. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
  188. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +0 -0
  189. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/vertexai/__init__.py +0 -0
  190. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/vertexai/instrumentation.py +0 -0
  191. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/vertexai/patch.py +0 -0
  192. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/weaviate/__init__.py +0 -0
  193. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +0 -0
  194. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/types/__init__.py +0 -0
  195. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/langtrace_sampler.py +0 -0
  196. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/misc.py +0 -0
  197. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
  198. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
  199. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/types.py +0 -0
  200. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/langtrace_python_sdk/utils/with_root_span.py +0 -0
  201. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/__init__.py +0 -0
  202. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
  203. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
  204. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
  205. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/anthropic/conftest.py +0 -0
  206. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/anthropic/test_anthropic.py +0 -0
  207. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/chroma/conftest.py +0 -0
  208. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/chroma/test_chroma.py +0 -0
  209. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/cohere/cassettes/test_cohere_chat.yaml +0 -0
  210. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +0 -0
  211. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -0
  212. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +0 -0
  213. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/cohere/conftest.py +0 -0
  214. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/cohere/test_cohere_chat.py +0 -0
  215. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/cohere/test_cohere_embed.py +0 -0
  216. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/cohere/test_cohere_rerank.py +0 -0
  217. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/conftest.py +0 -0
  218. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/groq/cassettes/test_async_chat_completion.yaml +0 -0
  219. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/groq/cassettes/test_async_chat_completion_streaming.yaml +0 -0
  220. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/groq/cassettes/test_chat_completion.yaml +0 -0
  221. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/groq/cassettes/test_chat_completion_streaming.yaml +0 -0
  222. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/groq/conftest.py +0 -0
  223. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/groq/test_groq.py +0 -0
  224. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/langchain/cassettes/test_langchain.yaml +0 -0
  225. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/langchain/conftest.py +0 -0
  226. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/langchain/test_langchain.py +0 -0
  227. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +0 -0
  228. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
  229. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
  230. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -0
  231. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
  232. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/conftest.py +0 -0
  233. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/test_chat_completion.py +0 -0
  234. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/test_embeddings.py +0 -0
  235. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/openai/test_image_generation.py +0 -0
  236. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
  237. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
  238. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/pinecone/conftest.py +0 -0
  239. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/pinecone/test_pinecone.py +0 -0
  240. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/qdrant/conftest.py +0 -0
  241. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/qdrant/test_qdrant.py +0 -0
  242. {langtrace_python_sdk-2.3.12 → langtrace_python_sdk-2.3.14}/src/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 2.3.12
3
+ Version: 2.3.14
4
4
  Summary: Python SDK for LangTrace
5
5
  Project-URL: Homepage, https://github.com/Scale3-Labs/langtrace-python-sdk
6
6
  Author-email: Scale3 Labs <engineering@scale3labs.com>
@@ -18,6 +18,7 @@ Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.25.0
18
18
  Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.46b0
19
19
  Requires-Dist: opentelemetry-instrumentation>=0.47b0
20
20
  Requires-Dist: opentelemetry-sdk>=1.25.0
21
+ Requires-Dist: sentry-sdk>=2.14.0
21
22
  Requires-Dist: sqlalchemy
22
23
  Requires-Dist: tiktoken>=0.1.1
23
24
  Requires-Dist: trace-attributes==7.0.4
@@ -196,6 +197,10 @@ langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
196
197
  | `api_host` | `Optional[str]` | `https://langtrace.ai/` | The API host for the remote exporter. |
197
198
  | `disable_instrumentations` | `Optional[DisableInstrumentations]` | `None` | You can pass an object to disable instrumentation for specific vendors ex: `{'only': ['openai']}` or `{'all_except': ['openai']}` |
198
199
 
200
+ ### Error Reporting to Langtrace
201
+
202
+ By default all sdk errors are reported to langtrace via Sentry. This can be disabled by setting the following enviroment variable to `False` like so `LANGTRACE_ERROR_REPORTING=False`
203
+
199
204
  ### Additional Customization
200
205
 
201
206
  - `@with_langtrace_root_span` - this decorator is designed to organize and relate different spans, in a hierarchical manner. When you're performing multiple operations that you want to monitor together as a unit, this function helps by establishing a "parent" (`LangtraceRootSpan` or whatever is passed to `name`) span. Then, any calls to the LLM APIs made within the given function (fn) will be considered "children" of this parent span. This setup is especially useful for tracking the performance or behavior of a group of operations collectively, rather than individually.
@@ -277,6 +282,7 @@ prompt = get_prompt_from_registry(<Registry ID>, options={"prompt_version": 1, "
277
282
  ```
278
283
 
279
284
  ### Opt out of tracing prompt and completion data
285
+
280
286
  By default, prompt and completion data are captured. If you would like to opt out of it, set the following env var,
281
287
 
282
288
  `TRACE_PROMPT_COMPLETION_DATA=false`
@@ -285,30 +291,31 @@ By default, prompt and completion data are captured. If you would like to opt ou
285
291
 
286
292
  Langtrace automatically captures traces from the following vendors:
287
293
 
288
- | Vendor | Type | Typescript SDK | Python SDK |
289
- | ------------ | --------------- | ------------------ | ------------------------------- |
290
- | OpenAI | LLM | :white_check_mark: | :white_check_mark: |
291
- | Anthropic | LLM | :white_check_mark: | :white_check_mark: |
292
- | Azure OpenAI | LLM | :white_check_mark: | :white_check_mark: |
293
- | Cohere | LLM | :white_check_mark: | :white_check_mark: |
294
- | Groq | LLM | :x: | :white_check_mark: |
295
- | Perplexity | LLM | :white_check_mark: | :white_check_mark: |
296
- | Gemini | LLM | :x: | :white_check_mark: |
297
- | Mistral | LLM | :x: | :white_check_mark: |
298
- | Langchain | Framework | :x: | :white_check_mark: |
299
- | LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
300
- | Langgraph | Framework | :x: | :white_check_mark: |
301
- | DSPy | Framework | :x: | :white_check_mark: |
302
- | CrewAI | Framework | :x: | :white_check_mark: |
303
- | Ollama | Framework | :x: | :white_check_mark: |
304
- | VertexAI | Framework | :x: | :white_check_mark: |
305
- | Vercel AI SDK| Framework | :white_check_mark: | :x: |
306
- | EmbedChain | Framework | :x: | :white_check_mark: |
307
- | Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
308
- | ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
309
- | QDrant | Vector Database | :white_check_mark: | :white_check_mark: |
310
- | Weaviate | Vector Database | :white_check_mark: | :white_check_mark: |
311
- | PGVector | Vector Database | :white_check_mark: | :white_check_mark: (SQLAlchemy) |
294
+ | Vendor | Type | Typescript SDK | Python SDK |
295
+ | ------------- | --------------- | ------------------ | ------------------------------- |
296
+ | OpenAI | LLM | :white_check_mark: | :white_check_mark: |
297
+ | Anthropic | LLM | :white_check_mark: | :white_check_mark: |
298
+ | Azure OpenAI | LLM | :white_check_mark: | :white_check_mark: |
299
+ | Cohere | LLM | :white_check_mark: | :white_check_mark: |
300
+ | Groq | LLM | :x: | :white_check_mark: |
301
+ | Perplexity | LLM | :white_check_mark: | :white_check_mark: |
302
+ | Gemini | LLM | :x: | :white_check_mark: |
303
+ | Mistral | LLM | :x: | :white_check_mark: |
304
+ | Langchain | Framework | :x: | :white_check_mark: |
305
+ | LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
306
+ | Langgraph | Framework | :x: | :white_check_mark: |
307
+ | DSPy | Framework | :x: | :white_check_mark: |
308
+ | CrewAI | Framework | :x: | :white_check_mark: |
309
+ | Ollama | Framework | :x: | :white_check_mark: |
310
+ | VertexAI | Framework | :x: | :white_check_mark: |
311
+ | Vercel AI SDK | Framework | :white_check_mark: | :x: |
312
+ | EmbedChain | Framework | :x: | :white_check_mark: |
313
+ | Autogen | Framework | :x: | :white_check_mark: |
314
+ | Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
315
+ | ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
316
+ | QDrant | Vector Database | :white_check_mark: | :white_check_mark: |
317
+ | Weaviate | Vector Database | :white_check_mark: | :white_check_mark: |
318
+ | PGVector | Vector Database | :white_check_mark: | :white_check_mark: (SQLAlchemy) |
312
319
 
313
320
  ---
314
321
 
@@ -148,6 +148,10 @@ langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
148
148
  | `api_host` | `Optional[str]` | `https://langtrace.ai/` | The API host for the remote exporter. |
149
149
  | `disable_instrumentations` | `Optional[DisableInstrumentations]` | `None` | You can pass an object to disable instrumentation for specific vendors ex: `{'only': ['openai']}` or `{'all_except': ['openai']}` |
150
150
 
151
+ ### Error Reporting to Langtrace
152
+
153
+ By default all sdk errors are reported to langtrace via Sentry. This can be disabled by setting the following enviroment variable to `False` like so `LANGTRACE_ERROR_REPORTING=False`
154
+
151
155
  ### Additional Customization
152
156
 
153
157
  - `@with_langtrace_root_span` - this decorator is designed to organize and relate different spans, in a hierarchical manner. When you're performing multiple operations that you want to monitor together as a unit, this function helps by establishing a "parent" (`LangtraceRootSpan` or whatever is passed to `name`) span. Then, any calls to the LLM APIs made within the given function (fn) will be considered "children" of this parent span. This setup is especially useful for tracking the performance or behavior of a group of operations collectively, rather than individually.
@@ -229,6 +233,7 @@ prompt = get_prompt_from_registry(<Registry ID>, options={"prompt_version": 1, "
229
233
  ```
230
234
 
231
235
  ### Opt out of tracing prompt and completion data
236
+
232
237
  By default, prompt and completion data are captured. If you would like to opt out of it, set the following env var,
233
238
 
234
239
  `TRACE_PROMPT_COMPLETION_DATA=false`
@@ -237,30 +242,31 @@ By default, prompt and completion data are captured. If you would like to opt ou
237
242
 
238
243
  Langtrace automatically captures traces from the following vendors:
239
244
 
240
- | Vendor | Type | Typescript SDK | Python SDK |
241
- | ------------ | --------------- | ------------------ | ------------------------------- |
242
- | OpenAI | LLM | :white_check_mark: | :white_check_mark: |
243
- | Anthropic | LLM | :white_check_mark: | :white_check_mark: |
244
- | Azure OpenAI | LLM | :white_check_mark: | :white_check_mark: |
245
- | Cohere | LLM | :white_check_mark: | :white_check_mark: |
246
- | Groq | LLM | :x: | :white_check_mark: |
247
- | Perplexity | LLM | :white_check_mark: | :white_check_mark: |
248
- | Gemini | LLM | :x: | :white_check_mark: |
249
- | Mistral | LLM | :x: | :white_check_mark: |
250
- | Langchain | Framework | :x: | :white_check_mark: |
251
- | LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
252
- | Langgraph | Framework | :x: | :white_check_mark: |
253
- | DSPy | Framework | :x: | :white_check_mark: |
254
- | CrewAI | Framework | :x: | :white_check_mark: |
255
- | Ollama | Framework | :x: | :white_check_mark: |
256
- | VertexAI | Framework | :x: | :white_check_mark: |
257
- | Vercel AI SDK| Framework | :white_check_mark: | :x: |
258
- | EmbedChain | Framework | :x: | :white_check_mark: |
259
- | Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
260
- | ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
261
- | QDrant | Vector Database | :white_check_mark: | :white_check_mark: |
262
- | Weaviate | Vector Database | :white_check_mark: | :white_check_mark: |
263
- | PGVector | Vector Database | :white_check_mark: | :white_check_mark: (SQLAlchemy) |
245
+ | Vendor | Type | Typescript SDK | Python SDK |
246
+ | ------------- | --------------- | ------------------ | ------------------------------- |
247
+ | OpenAI | LLM | :white_check_mark: | :white_check_mark: |
248
+ | Anthropic | LLM | :white_check_mark: | :white_check_mark: |
249
+ | Azure OpenAI | LLM | :white_check_mark: | :white_check_mark: |
250
+ | Cohere | LLM | :white_check_mark: | :white_check_mark: |
251
+ | Groq | LLM | :x: | :white_check_mark: |
252
+ | Perplexity | LLM | :white_check_mark: | :white_check_mark: |
253
+ | Gemini | LLM | :x: | :white_check_mark: |
254
+ | Mistral | LLM | :x: | :white_check_mark: |
255
+ | Langchain | Framework | :x: | :white_check_mark: |
256
+ | LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
257
+ | Langgraph | Framework | :x: | :white_check_mark: |
258
+ | DSPy | Framework | :x: | :white_check_mark: |
259
+ | CrewAI | Framework | :x: | :white_check_mark: |
260
+ | Ollama | Framework | :x: | :white_check_mark: |
261
+ | VertexAI | Framework | :x: | :white_check_mark: |
262
+ | Vercel AI SDK | Framework | :white_check_mark: | :x: |
263
+ | EmbedChain | Framework | :x: | :white_check_mark: |
264
+ | Autogen | Framework | :x: | :white_check_mark: |
265
+ | Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
266
+ | ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
267
+ | QDrant | Vector Database | :white_check_mark: | :white_check_mark: |
268
+ | Weaviate | Vector Database | :white_check_mark: | :white_check_mark: |
269
+ | PGVector | Vector Database | :white_check_mark: | :white_check_mark: (SQLAlchemy) |
264
270
 
265
271
  ---
266
272
 
@@ -30,6 +30,7 @@ dependencies = [
30
30
  'sqlalchemy',
31
31
  'fsspec>=2024.6.0',
32
32
  "transformers>=4.11.3",
33
+ "sentry-sdk>=2.14.0",
33
34
  ]
34
35
 
35
36
  requires-python = ">=3.9"
@@ -0,0 +1,8 @@
1
+ from .main import main as autogen_main
2
+ from .main import comedy_show
3
+
4
+
5
+ class AutoGenRunner:
6
+ def run(self):
7
+ # autogen_main()
8
+ comedy_show()
@@ -0,0 +1,72 @@
1
+ from langtrace_python_sdk import langtrace
2
+ from autogen import ConversableAgent
3
+ from dotenv import load_dotenv
4
+ from autogen.coding import LocalCommandLineCodeExecutor
5
+ import tempfile
6
+
7
+
8
+ load_dotenv()
9
+ langtrace.init(write_spans_to_console=False)
10
+ # agentops.init(api_key=os.getenv("AGENTOPS_API_KEY"))
11
+ # Create a temporary directory to store the code files.
12
+ temp_dir = tempfile.TemporaryDirectory()
13
+
14
+
15
+ # Create a local command line code executor.
16
+ executor = LocalCommandLineCodeExecutor(
17
+ timeout=10, # Timeout for each code execution in seconds.
18
+ work_dir=temp_dir.name, # Use the temporary directory to store the code files.
19
+ )
20
+
21
+
22
+ def main():
23
+
24
+ agent = ConversableAgent(
25
+ "chatbot",
26
+ llm_config={"config_list": [{"model": "gpt-4"}], "cache_seed": None},
27
+ code_execution_config=False, # Turn off code execution, by default it is off.
28
+ function_map=None, # No registered functions, by default it is None.
29
+ human_input_mode="NEVER", # Never ask for human input.
30
+ )
31
+
32
+ reply = agent.generate_reply(
33
+ messages=[{"content": "Tell me a joke.", "role": "user"}]
34
+ )
35
+ return reply
36
+
37
+
38
+ def comedy_show():
39
+ cathy = ConversableAgent(
40
+ name="cathy",
41
+ system_message="Your name is Cathy and you are a part of a duo of comedians.",
42
+ llm_config={
43
+ "config_list": [{"model": "gpt-4o-mini", "temperature": 0.9}],
44
+ "cache_seed": None,
45
+ },
46
+ description="Cathy is a comedian",
47
+ max_consecutive_auto_reply=10,
48
+ code_execution_config={
49
+ "executor": executor
50
+ }, # Use the local command line code executor.
51
+ function_map=None,
52
+ chat_messages=None,
53
+ silent=True,
54
+ default_auto_reply="Sorry, I don't know what to say.",
55
+ human_input_mode="NEVER", # Never ask for human input.
56
+ )
57
+
58
+ joe = ConversableAgent(
59
+ "joe",
60
+ system_message="Your name is Joe and you are a part of a duo of comedians.",
61
+ llm_config={
62
+ "config_list": [{"model": "gpt-4o-mini", "temperature": 0.7}],
63
+ "cache_seed": None,
64
+ },
65
+ human_input_mode="NEVER", # Never ask for human input.
66
+ )
67
+
68
+ result = joe.initiate_chat(
69
+ recipient=cathy, message="Cathy, tell me a joke.", max_turns=2
70
+ )
71
+
72
+ return result
@@ -1,3 +1,4 @@
1
+ from examples.langchain_example.langchain_google_genai import basic_google_genai
1
2
  from .basic import basic_app, rag, load_and_split
2
3
  from langtrace_python_sdk import with_langtrace_root_span
3
4
 
@@ -12,6 +13,7 @@ class LangChainRunner:
12
13
  rag()
13
14
  load_and_split()
14
15
  basic_graph_tools()
16
+ basic_google_genai()
15
17
 
16
18
 
17
19
  class GroqRunner:
@@ -0,0 +1,29 @@
1
+ from langchain_core.messages import HumanMessage
2
+ from langchain_google_genai import ChatGoogleGenerativeAI
3
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
4
+ from dotenv import find_dotenv, load_dotenv
5
+ from langtrace_python_sdk import langtrace
6
+
7
+ _ = load_dotenv(find_dotenv())
8
+
9
+ langtrace.init()
10
+
11
+ @with_langtrace_root_span("basic_google_genai")
12
+ def basic_google_genai():
13
+ llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
14
+ # example
15
+ message = HumanMessage(
16
+ content=[
17
+ {
18
+ "type": "text",
19
+ "text": "What's in this image?",
20
+ },
21
+ ]
22
+ )
23
+ message_image = HumanMessage(content="https://picsum.photos/seed/picsum/200/300")
24
+
25
+ res = llm.invoke([message, message_image])
26
+ # print(res)
27
+
28
+
29
+ basic_google_genai()
@@ -0,0 +1,2 @@
1
+ LANGTRACE_SDK_NAME = "langtrace-python-sdk"
2
+ SENTRY_DSN = "https://7f8eed3a1237fb2efef0f5e96ab407af@o1419498.ingest.us.sentry.io/4507929133056000"
@@ -31,6 +31,7 @@ SERVICE_PROVIDERS = {
31
31
  "GEMINI": "Gemini",
32
32
  "MISTRAL": "Mistral",
33
33
  "EMBEDCHAIN": "Embedchain",
34
+ "AUTOGEN": "Autogen",
34
35
  }
35
36
 
36
37
  LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY = "langtrace_additional_attributes"
@@ -14,6 +14,7 @@ from .qdrant import QdrantInstrumentation
14
14
  from .weaviate import WeaviateInstrumentation
15
15
  from .ollama import OllamaInstrumentor
16
16
  from .dspy import DspyInstrumentation
17
+ from .autogen import AutogenInstrumentation
17
18
  from .vertexai import VertexAIInstrumentation
18
19
  from .gemini import GeminiInstrumentation
19
20
  from .mistral import MistralInstrumentation
@@ -37,6 +38,7 @@ __all__ = [
37
38
  "WeaviateInstrumentation",
38
39
  "OllamaInstrumentor",
39
40
  "DspyInstrumentation",
41
+ "AutogenInstrumentation",
40
42
  "VertexAIInstrumentation",
41
43
  "GeminiInstrumentation",
42
44
  "MistralInstrumentation",
@@ -0,0 +1,3 @@
1
+ from .instrumentation import AutogenInstrumentation
2
+
3
+ __all__ = ["AutogenInstrumentation"]
@@ -0,0 +1,42 @@
1
+ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
2
+ from opentelemetry.trace import get_tracer
3
+ from wrapt import wrap_function_wrapper as _W
4
+ from importlib_metadata import version as v
5
+ from .patch import patch_generate_reply, patch_initiate_chat
6
+
7
+
8
+ class AutogenInstrumentation(BaseInstrumentor):
9
+ def instrumentation_dependencies(self):
10
+ return ["autogen >= 0.1.0"]
11
+
12
+ def _instrument(self, **kwargs):
13
+ print("Instrumneting autogen")
14
+ tracer_provider = kwargs.get("tracer_provider")
15
+ tracer = get_tracer(__name__, "", tracer_provider)
16
+ version = v("autogen")
17
+ # conversable_agent.intiate_chat
18
+ # conversable_agent.register_function
19
+ # agent.Agent
20
+ # AgentCreation
21
+ # Tools --> Register_for_llm, register_for_execution, register_for_function
22
+ try:
23
+ _W(
24
+ module="autogen.agentchat.conversable_agent",
25
+ name="ConversableAgent.initiate_chat",
26
+ wrapper=patch_initiate_chat(
27
+ "conversable_agent.initiate_chat", version, tracer
28
+ ),
29
+ )
30
+
31
+ _W(
32
+ module="autogen.agentchat.conversable_agent",
33
+ name="ConversableAgent.generate_reply",
34
+ wrapper=patch_generate_reply(
35
+ "conversable_agent.generate_reply", version, tracer
36
+ ),
37
+ )
38
+ except Exception as e:
39
+ pass
40
+
41
+ def _uninstrument(self, **kwargs):
42
+ pass
@@ -0,0 +1,132 @@
1
+ from langtrace_python_sdk.utils.llm import (
2
+ get_langtrace_attributes,
3
+ get_extra_attributes,
4
+ get_span_name,
5
+ set_span_attributes,
6
+ get_llm_request_attributes,
7
+ set_event_completion,
8
+ set_usage_attributes,
9
+ )
10
+ from langtrace_python_sdk.constants.instrumentation.common import SERVICE_PROVIDERS
11
+ from langtrace.trace_attributes import FrameworkSpanAttributes
12
+ from opentelemetry.trace.status import Status, StatusCode
13
+ from langtrace.trace_attributes import SpanAttributes
14
+ from opentelemetry.trace import Tracer, SpanKind
15
+
16
+ from langtrace_python_sdk.utils import deduce_args_and_kwargs, set_span_attribute
17
+ import json
18
+
19
+
20
+ def patch_initiate_chat(name, version, tracer: Tracer):
21
+ def traced_method(wrapped, instance, args, kwargs):
22
+ all_params = deduce_args_and_kwargs(wrapped, *args, **kwargs)
23
+ all_params["recipient"] = json.dumps(parse_agent(all_params.get("recipient")))
24
+ span_attributes = {
25
+ **get_langtrace_attributes(
26
+ service_provider=SERVICE_PROVIDERS["AUTOGEN"],
27
+ version=version,
28
+ vendor_type="framework",
29
+ ),
30
+ "sender": json.dumps(parse_agent(instance)),
31
+ **all_params,
32
+ }
33
+ attributes = FrameworkSpanAttributes(**span_attributes)
34
+
35
+ with tracer.start_as_current_span(
36
+ name=get_span_name(name), kind=SpanKind.CLIENT
37
+ ) as span:
38
+ try:
39
+ set_span_attributes(span, attributes)
40
+ result = wrapped(*args, **kwargs)
41
+ # set_response_attributes(span, result)
42
+ return result
43
+ except Exception as err:
44
+ # Record the exception in the span
45
+ span.record_exception(err)
46
+
47
+ # Set the span status to indicate an error
48
+ span.set_status(Status(StatusCode.ERROR, str(err)))
49
+
50
+ # Reraise the exception to ensure it's not swallowed
51
+ raise
52
+
53
+ return traced_method
54
+
55
+
56
+ def patch_generate_reply(name, version, tracer: Tracer):
57
+
58
+ def traced_method(wrapped, instance, args, kwargs):
59
+
60
+ llm_config = instance.llm_config
61
+ kwargs = {
62
+ **kwargs,
63
+ **llm_config.get("config_list")[0],
64
+ }
65
+ service_provider = SERVICE_PROVIDERS["AUTOGEN"]
66
+
67
+ span_attributes = {
68
+ **get_langtrace_attributes(
69
+ version=version,
70
+ service_provider=service_provider,
71
+ vendor_type="framework",
72
+ ),
73
+ **get_llm_request_attributes(
74
+ kwargs,
75
+ prompts=kwargs.get("messages"),
76
+ ),
77
+ **get_extra_attributes(),
78
+ }
79
+ attributes = FrameworkSpanAttributes(**span_attributes)
80
+
81
+ with tracer.start_as_current_span(
82
+ name=get_span_name(name), kind=SpanKind.CLIENT
83
+ ) as span:
84
+ try:
85
+
86
+ result = wrapped(*args, **kwargs)
87
+
88
+ # if caching is disabled, return result as langtrace will instrument the rest.
89
+ if "cache_seed" in llm_config and llm_config.get("cache_seed") is None:
90
+ return result
91
+
92
+ set_span_attributes(span, attributes)
93
+ set_event_completion(span, [{"role": "assistant", "content": result}])
94
+ total_cost, response_model = list(instance.get_total_usage().keys())
95
+ set_span_attribute(
96
+ span, SpanAttributes.LLM_RESPONSE_MODEL, response_model
97
+ )
98
+ set_usage_attributes(
99
+ span, instance.get_total_usage().get(response_model)
100
+ )
101
+
102
+ return result
103
+
104
+ except Exception as err:
105
+ # Record the exception in the span
106
+ span.record_exception(err)
107
+
108
+ # Set the span status to indicate an error
109
+ span.set_status(Status(StatusCode.ERROR, str(err)))
110
+
111
+ # Reraise the exception to ensure it's not swallowed
112
+ raise
113
+
114
+ return traced_method
115
+
116
+
117
+ def set_response_attributes(span, result):
118
+ summary = getattr(result, "summary", None)
119
+ if summary:
120
+ set_span_attribute(span, "autogen.chat.summary", summary)
121
+
122
+
123
+ def parse_agent(agent):
124
+
125
+ return {
126
+ "name": getattr(agent, "name", None),
127
+ "description": getattr(agent, "description", None),
128
+ "system_message": str(getattr(agent, "system_message", None)),
129
+ "silent": getattr(agent, "silent", None),
130
+ "llm_config": str(getattr(agent, "llm_config", None)),
131
+ "human_input_mode": getattr(agent, "human_input_mode", None),
132
+ }
@@ -81,21 +81,16 @@ class LangchainInstrumentation(BaseInstrumentor):
81
81
  tracer_provider = kwargs.get("tracer_provider")
82
82
  tracer = get_tracer(__name__, "", tracer_provider)
83
83
  version = importlib.metadata.version("langchain")
84
-
85
84
  wrap_function_wrapper(
86
85
  "langchain.agents.agent",
87
86
  "RunnableAgent.plan",
88
- generic_patch(
89
- "RunnableAgent.plan", "plan", tracer, version, True, True
90
- ),
87
+ generic_patch("RunnableAgent.plan", "plan", tracer, version, True, True),
91
88
  )
92
89
 
93
90
  wrap_function_wrapper(
94
91
  "langchain.agents.agent",
95
92
  "RunnableAgent.aplan",
96
- generic_patch(
97
- "RunnableAgent.aplan", "plan", tracer, version, True, True
98
- ),
93
+ generic_patch("RunnableAgent.aplan", "plan", tracer, version, True, True),
99
94
  )
100
95
 
101
96
  # modules_to_patch = []
@@ -134,6 +134,20 @@ class LangchainCoreInstrumentation(BaseInstrumentor):
134
134
  ]
135
135
 
136
136
  modules_to_patch = [
137
+ (
138
+ "langchain_core.language_models.chat_models",
139
+ "chatmodel",
140
+ generic_patch,
141
+ True,
142
+ True,
143
+ ),
144
+ (
145
+ "langchain_core.language_models.base",
146
+ "language_model",
147
+ generic_patch,
148
+ True,
149
+ True,
150
+ ),
137
151
  ("langchain_core.retrievers", "retriever", generic_patch, True, True),
138
152
  ("langchain_core.prompts.chat", "prompt", generic_patch, True, True),
139
153
  (
@@ -57,7 +57,24 @@ def generic_patch(
57
57
  "langtrace.service.version": version,
58
58
  "langtrace.version": v(LANGTRACE_SDK_NAME),
59
59
  "langchain.task.name": task,
60
- **(extra_attributes if extra_attributes is not None else {}),
60
+ "gen_ai.request.model": (
61
+ instance.model if hasattr(instance, "model") else None
62
+ ),
63
+ SpanAttributes.LLM_REQUEST_MAX_TOKENS: (
64
+ instance.max_output_tokens
65
+ if hasattr(instance, "max_output_tokens")
66
+ else None
67
+ ),
68
+ SpanAttributes.LLM_TOP_K: (
69
+ instance.top_k if hasattr(instance, "top_k") else None
70
+ ),
71
+ SpanAttributes.LLM_REQUEST_TOP_P: (
72
+ instance.top_p if hasattr(instance, "top_p") else None
73
+ ),
74
+ SpanAttributes.LLM_REQUEST_TEMPERATURE: (
75
+ instance.temperature if hasattr(instance, "temperature") else None
76
+ ),
77
+ **(extra_attributes if extra_attributes is not None else {}), # type: ignore
61
78
  }
62
79
 
63
80
  if trace_input and len(args) > 0:
@@ -79,21 +96,17 @@ def generic_patch(
79
96
  try:
80
97
  # Attempt to call the original method
81
98
  result = wrapped(*args, **kwargs)
82
-
83
99
  if trace_output:
84
100
  span.set_attribute("langchain.outputs", to_json_string(result))
85
- if hasattr(result, 'usage'):
86
- prompt_tokens = result.usage.prompt_tokens
87
- completion_tokens = result.usage.completion_tokens
88
- span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, prompt_tokens)
89
- span.set_attribute(SpanAttributes.LLM_USAGE_COMPLETION_TOKENS, completion_tokens)
90
- elif hasattr(result, 'generations') and len(result.generations) > 0 and len(result.generations[0]) > 0 and hasattr(result.generations[0][0], 'text') and isinstance(result.generations[0][0].text, str):
91
- span.set_attribute(SpanAttributes.LLM_USAGE_COMPLETION_TOKENS, instance.get_num_tokens(result.generations[0][0].text))
92
- elif len(args) > 0 and len(args[0]) > 0 and not hasattr(args[0][0], 'text') and hasattr(instance, 'get_num_tokens'):
93
- span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, instance.get_num_tokens(args[0][0]))
94
- elif len(args) > 0 and len(args[0]) > 0 and hasattr(args[0][0], 'text') and isinstance(args[0][0].text, str) and hasattr(instance, 'get_num_tokens'):
95
- span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, instance.get_num_tokens(args[0][0].text))
96
-
101
+ if hasattr(result, "usage_metadata"):
102
+ span.set_attribute(
103
+ SpanAttributes.LLM_USAGE_PROMPT_TOKENS,
104
+ result.usage_metadata["input_tokens"],
105
+ )
106
+ span.set_attribute(
107
+ SpanAttributes.LLM_USAGE_COMPLETION_TOKENS,
108
+ result.usage_metadata["output_tokens"],
109
+ )
97
110
  span.set_status(StatusCode.OK)
98
111
  return result
99
112
  except Exception as err:
@@ -208,9 +221,17 @@ def clean_empty(d):
208
221
  if not isinstance(d, (dict, list, tuple)):
209
222
  return d
210
223
  if isinstance(d, tuple):
211
- return tuple(val for val in (clean_empty(val) for val in d) if val != () and val is not None)
224
+ return tuple(
225
+ val
226
+ for val in (clean_empty(val) for val in d)
227
+ if val != () and val is not None
228
+ )
212
229
  if isinstance(d, list):
213
- return [val for val in (clean_empty(val) for val in d) if val != [] and val is not None]
230
+ return [
231
+ val
232
+ for val in (clean_empty(val) for val in d)
233
+ if val != [] and val is not None
234
+ ]
214
235
  result = {}
215
236
  for k, val in d.items():
216
237
  if isinstance(val, dict):
@@ -226,7 +247,7 @@ def clean_empty(d):
226
247
  result[k] = val.strip()
227
248
  elif isinstance(val, object):
228
249
  # some langchain objects have a text attribute
229
- val = getattr(val, 'text', None)
250
+ val = getattr(val, "text", None)
230
251
  if val is not None and val.strip() != "":
231
252
  result[k] = val.strip()
232
253
  return result