langtrace-python-sdk 2.1.13__tar.gz → 2.1.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 (163) hide show
  1. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/PKG-INFO +8 -7
  2. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/README.md +6 -5
  3. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/pyproject.toml +1 -1
  4. langtrace_python_sdk-2.1.14/src/examples/__init__.py +1 -0
  5. langtrace_python_sdk-2.1.14/src/examples/anthropic_example/__init__.py +8 -0
  6. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/anthropic_example/completion.py +1 -2
  7. langtrace_python_sdk-2.1.14/src/examples/chroma_example/__init__.py +8 -0
  8. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/chroma_example/basic.py +1 -1
  9. langtrace_python_sdk-2.1.14/src/examples/cohere_example/__init__.py +17 -0
  10. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/chat.py +1 -1
  11. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/chat_stream.py +1 -1
  12. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/embed.py +1 -1
  13. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/rerank.py +1 -1
  14. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/cohere_example/tools.py +1 -1
  15. langtrace_python_sdk-2.1.14/src/examples/fastapi_example/__init__.py +6 -0
  16. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/fastapi_example/basic_route.py +2 -0
  17. langtrace_python_sdk-2.1.14/src/examples/langchain_example/__init__.py +10 -0
  18. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/basic.py +3 -3
  19. langtrace_python_sdk-2.1.14/src/examples/llamaindex_example/__init__.py +11 -0
  20. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/llamaindex_example/agent.py +4 -3
  21. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/llamaindex_example/basic.py +2 -2
  22. langtrace_python_sdk-2.1.14/src/examples/openai_example/__init__.py +21 -0
  23. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/async_tool_calling_nonstreaming.py +3 -3
  24. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/async_tool_calling_streaming.py +2 -1
  25. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/chat_completion.py +3 -3
  26. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/embeddings_create.py +2 -2
  27. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/function_calling.py +3 -2
  28. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/images_edit.py +2 -2
  29. langtrace_python_sdk-2.1.14/src/examples/pinecone_example/__init__.py +9 -0
  30. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/pinecone_example/basic.py +7 -2
  31. langtrace_python_sdk-2.1.14/src/examples/qdrant_example/__init__.py +8 -0
  32. langtrace_python_sdk-2.1.14/src/examples/weaviate_example/__init__.py +26 -0
  33. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/weaviate_example/query_text.py +12 -8
  34. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/__init__.py +6 -1
  35. langtrace_python_sdk-2.1.14/src/langtrace_python_sdk/version.py +1 -0
  36. langtrace_python_sdk-2.1.14/src/run_example.py +76 -0
  37. langtrace_python_sdk-2.1.13/src/examples/chroma_example/__init__.py +0 -1
  38. langtrace_python_sdk-2.1.13/src/examples/langchain_example/__init__.py +0 -0
  39. langtrace_python_sdk-2.1.13/src/examples/llamaindex_example/__init__.py +0 -0
  40. langtrace_python_sdk-2.1.13/src/examples/openai_example/__init__.py +0 -0
  41. langtrace_python_sdk-2.1.13/src/examples/pinecone_example/__init__.py +0 -0
  42. langtrace_python_sdk-2.1.13/src/examples/qdrant_example/__init__.py +0 -0
  43. langtrace_python_sdk-2.1.13/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
  44. langtrace_python_sdk-2.1.13/src/langtrace_python_sdk/extensions/__init__.py +0 -0
  45. langtrace_python_sdk-2.1.13/src/langtrace_python_sdk/version.py +0 -1
  46. langtrace_python_sdk-2.1.13/src/run_example.py +0 -56
  47. langtrace_python_sdk-2.1.13/src/tests/__init__.py +0 -0
  48. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/.gitignore +0 -0
  49. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/LICENSE +0 -0
  50. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/__init__.py +0 -0
  51. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/hiveagent_example/basic.py +0 -0
  52. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/groq_example.py +0 -0
  53. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/langgraph_example.py +0 -0
  54. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/langchain_example/tool.py +0 -0
  55. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/llamaindex_example/data/abramov.txt +0 -0
  56. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/images_generate.py +0 -0
  57. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/resources/lounge_flamingo.png +0 -0
  58. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/resources/mask.png +0 -0
  59. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/tool_calling.py +0 -0
  60. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
  61. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/openai_example/tool_calling_streaming.py +0 -0
  62. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/perplexity_example/basic.py +0 -0
  63. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/examples/qdrant_example/basic.py +0 -0
  64. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/__init__.py +0 -0
  65. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
  66. {langtrace_python_sdk-2.1.13/src/examples → langtrace_python_sdk-2.1.14/src/langtrace_python_sdk/constants/instrumentation}/__init__.py +0 -0
  67. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +0 -0
  68. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
  69. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
  70. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/common.py +0 -0
  71. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
  72. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
  73. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
  74. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
  75. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +0 -0
  76. {langtrace_python_sdk-2.1.13/src/examples/anthropic_example → langtrace_python_sdk-2.1.14/src/langtrace_python_sdk/extensions}/__init__.py +0 -0
  77. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
  78. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/__init__.py +0 -0
  79. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
  80. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +0 -0
  81. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -0
  82. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
  83. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
  84. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -0
  85. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
  86. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
  87. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
  88. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
  89. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
  90. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
  91. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
  92. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +0 -0
  93. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
  94. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
  95. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
  96. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
  97. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
  98. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +0 -0
  99. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +0 -0
  100. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
  101. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
  102. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
  103. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
  104. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
  105. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
  106. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
  107. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
  108. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/openai/patch.py +0 -0
  109. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
  110. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
  111. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +0 -0
  112. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
  113. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
  114. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +0 -0
  115. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/weaviate/__init__.py +0 -0
  116. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +0 -0
  117. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +0 -0
  118. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/langtrace.py +0 -0
  119. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/types/__init__.py +0 -0
  120. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/__init__.py +0 -0
  121. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/llm.py +0 -0
  122. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/misc.py +0 -0
  123. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
  124. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/sdk_version_checker.py +0 -0
  125. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
  126. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/types.py +0 -0
  127. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/langtrace_python_sdk/utils/with_root_span.py +0 -0
  128. {langtrace_python_sdk-2.1.13/src/examples/cohere_example → langtrace_python_sdk-2.1.14/src/tests}/__init__.py +0 -0
  129. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
  130. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
  131. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
  132. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/conftest.py +0 -0
  133. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/anthropic/test_anthropic.py +0 -0
  134. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/chroma/conftest.py +0 -0
  135. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/chroma/test_chroma.py +0 -0
  136. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/cassettes/test_cohere_chat.yaml +0 -0
  137. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +0 -0
  138. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -0
  139. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +0 -0
  140. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/conftest.py +0 -0
  141. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/test_cohere_chat.py +0 -0
  142. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/test_cohere_embed.py +0 -0
  143. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/cohere/test_cohere_rerank.py +0 -0
  144. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/conftest.py +0 -0
  145. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/langchain/cassettes/test_langchain.yaml +0 -0
  146. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/langchain/conftest.py +0 -0
  147. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/langchain/test_langchain.py +0 -0
  148. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +0 -0
  149. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
  150. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
  151. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -0
  152. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
  153. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/conftest.py +0 -0
  154. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/test_chat_completion.py +0 -0
  155. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/test_embeddings.py +0 -0
  156. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/openai/test_image_generation.py +0 -0
  157. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
  158. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
  159. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/pinecone/conftest.py +0 -0
  160. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/pinecone/test_pinecone.py +0 -0
  161. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/qdrant/conftest.py +0 -0
  162. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.14}/src/tests/qdrant/test_qdrant.py +0 -0
  163. {langtrace_python_sdk-2.1.13 → langtrace_python_sdk-2.1.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.1.13
3
+ Version: 2.1.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>
@@ -19,7 +19,7 @@ Requires-Dist: opentelemetry-instrumentation>=0.46b0
19
19
  Requires-Dist: opentelemetry-sdk>=1.25.0
20
20
  Requires-Dist: sqlalchemy
21
21
  Requires-Dist: tiktoken>=0.1.1
22
- Requires-Dist: trace-attributes==4.0.5
22
+ Requires-Dist: trace-attributes<6.0.0,>=5.0.0
23
23
  Provides-Extra: dev
24
24
  Requires-Dist: anthropic; extra == 'dev'
25
25
  Requires-Dist: chromadb; extra == 'dev'
@@ -193,7 +193,7 @@ langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
193
193
  - `@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.
194
194
 
195
195
  ```python
196
- from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
196
+ from langtrace_python_sdk import with_langtrace_root_span
197
197
 
198
198
  @with_langtrace_root_span()
199
199
  def example():
@@ -208,10 +208,8 @@ def example():
208
208
  - `with_additional_attributes` - this function is designed to enhance the traces by adding custom attributes to the current context. These custom attributes provide extra details about the operations being performed, making it easier to analyze and understand their behavior.
209
209
 
210
210
  ```python
211
- from langtrace_python_sdk.utils.with_root_span import (
212
- with_langtrace_root_span,
213
- with_additional_attributes,
214
- )
211
+ from langtrace_python_sdk import with_langtrace_root_span, with_additional_attributes
212
+
215
213
 
216
214
  @with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
217
215
  def api_call1():
@@ -277,6 +275,9 @@ Langtrace automatically captures traces from the following vendors:
277
275
 
278
276
  We welcome contributions to this project. To get started, fork this repository and start developing. To get involved, join our [Discord](https://discord.langtrace.ai) workspace.
279
277
 
278
+ If you want to run any of the examples go to `run_example.py` file, you will find `ENABLED_EXAMPLES`. choose the example you want to run and just toggle the flag to `True` and run the file using `python src/run_example.py`
279
+
280
+
280
281
  ---
281
282
 
282
283
  ## Security
@@ -153,7 +153,7 @@ langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
153
153
  - `@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.
154
154
 
155
155
  ```python
156
- from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
156
+ from langtrace_python_sdk import with_langtrace_root_span
157
157
 
158
158
  @with_langtrace_root_span()
159
159
  def example():
@@ -168,10 +168,8 @@ def example():
168
168
  - `with_additional_attributes` - this function is designed to enhance the traces by adding custom attributes to the current context. These custom attributes provide extra details about the operations being performed, making it easier to analyze and understand their behavior.
169
169
 
170
170
  ```python
171
- from langtrace_python_sdk.utils.with_root_span import (
172
- with_langtrace_root_span,
173
- with_additional_attributes,
174
- )
171
+ from langtrace_python_sdk import with_langtrace_root_span, with_additional_attributes
172
+
175
173
 
176
174
  @with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
177
175
  def api_call1():
@@ -237,6 +235,9 @@ Langtrace automatically captures traces from the following vendors:
237
235
 
238
236
  We welcome contributions to this project. To get started, fork this repository and start developing. To get involved, join our [Discord](https://discord.langtrace.ai) workspace.
239
237
 
238
+ If you want to run any of the examples go to `run_example.py` file, you will find `ENABLED_EXAMPLES`. choose the example you want to run and just toggle the flag to `True` and run the file using `python src/run_example.py`
239
+
240
+
240
241
  ---
241
242
 
242
243
  ## Security
@@ -18,7 +18,7 @@ classifiers=[
18
18
  "Operating System :: OS Independent",
19
19
  ]
20
20
  dependencies = [
21
- 'trace-attributes==4.0.5',
21
+ 'trace-attributes>=5.0.0,<6.0.0',
22
22
  'opentelemetry-api>=1.25.0',
23
23
  'opentelemetry-sdk>=1.25.0',
24
24
  'opentelemetry-instrumentation>=0.46b0',
@@ -0,0 +1,8 @@
1
+ from examples.anthropic_example.completion import messages_create
2
+ from langtrace_python_sdk import with_langtrace_root_span
3
+
4
+
5
+ class AnthropicRunner:
6
+ @with_langtrace_root_span("Anthropic")
7
+ def run(self):
8
+ messages_create()
@@ -7,12 +7,11 @@ from langtrace_python_sdk import langtrace, with_langtrace_root_span
7
7
 
8
8
  _ = load_dotenv(find_dotenv())
9
9
 
10
- langtrace.init(write_spans_to_console=True)
10
+ langtrace.init()
11
11
 
12
12
 
13
13
  @with_langtrace_root_span("messages_create")
14
14
  def messages_create():
15
-
16
15
  client = anthropic.Anthropic()
17
16
 
18
17
  message = client.messages.create(
@@ -0,0 +1,8 @@
1
+ from examples.chroma_example.basic import basic
2
+ from langtrace_python_sdk import with_langtrace_root_span
3
+
4
+
5
+ class ChromaRunner:
6
+ @with_langtrace_root_span("Chroma")
7
+ def run(self):
8
+ basic()
@@ -7,7 +7,7 @@ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
7
7
 
8
8
  _ = load_dotenv(find_dotenv())
9
9
 
10
- langtrace.init(write_spans_to_console=True)
10
+ langtrace.init(write_spans_to_console=False)
11
11
 
12
12
 
13
13
  @with_langtrace_root_span()
@@ -0,0 +1,17 @@
1
+ from examples.cohere_example.chat import chat_comp
2
+ from examples.cohere_example.chat_stream import chat_stream
3
+ from examples.cohere_example.tools import tool_calling
4
+ from examples.cohere_example.embed import embed
5
+ from examples.cohere_example.rerank import rerank
6
+ from langtrace_python_sdk import with_langtrace_root_span
7
+
8
+
9
+ class CohereRunner:
10
+
11
+ @with_langtrace_root_span("Cohere")
12
+ def run(self):
13
+ chat_comp()
14
+ chat_stream()
15
+ tool_calling()
16
+ embed()
17
+ rerank()
@@ -7,7 +7,7 @@ from langtrace_python_sdk import langtrace
7
7
 
8
8
  _ = load_dotenv(find_dotenv())
9
9
 
10
- langtrace.init(write_spans_to_console=True)
10
+ langtrace.init()
11
11
 
12
12
 
13
13
  co = cohere.Client()
@@ -5,7 +5,7 @@ from langtrace_python_sdk import langtrace
5
5
 
6
6
  _ = load_dotenv(find_dotenv())
7
7
 
8
- langtrace.init(write_spans_to_console=True)
8
+ langtrace.init()
9
9
 
10
10
 
11
11
  co = cohere.Client()
@@ -7,7 +7,7 @@ from langtrace_python_sdk import langtrace
7
7
 
8
8
  _ = load_dotenv(find_dotenv())
9
9
 
10
- langtrace.init(write_spans_to_console=True)
10
+ langtrace.init()
11
11
 
12
12
 
13
13
  co = cohere.Client()
@@ -7,7 +7,7 @@ from langtrace_python_sdk import langtrace
7
7
 
8
8
  _ = load_dotenv(find_dotenv())
9
9
 
10
- langtrace.init(write_spans_to_console=True)
10
+ langtrace.init()
11
11
 
12
12
 
13
13
  co = cohere.Client()
@@ -7,7 +7,7 @@ from langtrace_python_sdk import langtrace
7
7
 
8
8
  _ = load_dotenv(find_dotenv())
9
9
 
10
- langtrace.init(write_spans_to_console=True)
10
+ langtrace.init()
11
11
 
12
12
  co = cohere.Client()
13
13
 
@@ -0,0 +1,6 @@
1
+ from .basic_route import root
2
+
3
+
4
+ class FastAPIRunner:
5
+ def run(self):
6
+ root()
@@ -7,7 +7,9 @@ from langchain_openai import ChatOpenAI, OpenAIEmbeddings
7
7
  from openai import OpenAI
8
8
 
9
9
  from langtrace_python_sdk import langtrace
10
+ from dotenv import load_dotenv
10
11
 
12
+ load_dotenv()
11
13
  langtrace.init(write_spans_to_console=True)
12
14
  app = FastAPI()
13
15
  client = OpenAI()
@@ -0,0 +1,10 @@
1
+ from .basic import basic_app, rag, load_and_split
2
+ from langtrace_python_sdk import with_langtrace_root_span
3
+
4
+
5
+ class LangChainRunner:
6
+ @with_langtrace_root_span("LangChain")
7
+ def run(self):
8
+ basic_app()
9
+ rag()
10
+ load_and_split()
@@ -18,7 +18,7 @@ _ = load_dotenv(find_dotenv())
18
18
  langtrace.init()
19
19
 
20
20
 
21
- @with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
21
+ # @with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
22
22
  def api_call_1():
23
23
  llm = ChatOpenAI()
24
24
  prompt = ChatPromptTemplate.from_messages(
@@ -33,7 +33,7 @@ def api_call_1():
33
33
  print(res)
34
34
 
35
35
 
36
- @with_additional_attributes({"user.id": "37373", "user.feedback.rating": 1})
36
+ # @with_additional_attributes({"user.id": "37373", "user.feedback.rating": 1})
37
37
  def api_call_2():
38
38
  llm = ChatOpenAI()
39
39
  prompt = ChatPromptTemplate.from_messages(
@@ -49,7 +49,7 @@ def api_call_2():
49
49
 
50
50
 
51
51
  @with_langtrace_root_span()
52
- def basic():
52
+ def basic_app():
53
53
  api_call_1()
54
54
  api_call_2()
55
55
 
@@ -0,0 +1,11 @@
1
+ from langtrace_python_sdk import with_langtrace_root_span
2
+
3
+
4
+ class LlamaIndexRunner:
5
+ @with_langtrace_root_span("LlamaIndex")
6
+ def run(self):
7
+ from .basic import basic_app
8
+ from .agent import main
9
+
10
+ basic_app()
11
+ main()
@@ -12,7 +12,7 @@ import nest_asyncio
12
12
 
13
13
  nest_asyncio.apply()
14
14
 
15
- langtrace.init(write_spans_to_console=True)
15
+ langtrace.init(write_spans_to_console=False)
16
16
 
17
17
 
18
18
  def multiply(a: int, b: int) -> int:
@@ -82,5 +82,6 @@ class YourOpenAIAgent:
82
82
 
83
83
 
84
84
  # agent = YourOpenAIAgent(tools=[multiply_tool, add_tool])
85
- llm = OpenAI(model="gpt-3.5-turbo-0613")
86
- agent = OpenAIAgent.from_tools([multiply_tool, add_tool], llm=llm, verbose=True)
85
+ def main():
86
+ llm = OpenAI(model="gpt-3.5-turbo-0613")
87
+ agent = OpenAIAgent.from_tools([multiply_tool, add_tool], llm=llm, verbose=True)
@@ -7,11 +7,11 @@ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
7
7
  _ = load_dotenv(find_dotenv())
8
8
 
9
9
 
10
- langtrace.init(write_spans_to_console=True)
10
+ langtrace.init(write_spans_to_console=False)
11
11
 
12
12
 
13
13
  @with_langtrace_root_span()
14
- def basic():
14
+ def basic_app():
15
15
  documents = SimpleDirectoryReader(
16
16
  "src/examples/llamaindex_example/data"
17
17
  ).load_data()
@@ -0,0 +1,21 @@
1
+ from langtrace_python_sdk import with_langtrace_root_span
2
+
3
+
4
+ class OpenAIRunner:
5
+ @with_langtrace_root_span("OpenAI")
6
+ def run(self):
7
+ import asyncio
8
+ from .async_tool_calling_nonstreaming import run_conversation
9
+ from .async_tool_calling_streaming import (
10
+ run_conversation as run_conversation_streaming,
11
+ )
12
+ from .chat_completion import chat_completion as chat_completion_example
13
+ from .embeddings_create import embeddings_create as embeddings_create_example
14
+ from .function_calling import function_calling as function_example
15
+ from .images_edit import image_edit
16
+
17
+ asyncio.run(run_conversation())
18
+ asyncio.run(run_conversation_streaming())
19
+ chat_completion_example()
20
+ embeddings_create_example()
21
+ function_example()
@@ -3,13 +3,12 @@ import json
3
3
  from dotenv import find_dotenv, load_dotenv
4
4
  from openai import AsyncOpenAI
5
5
 
6
- from langtrace_python_sdk import langtrace
6
+ from langtrace_python_sdk import langtrace, with_langtrace_root_span
7
7
 
8
- # from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
9
8
 
10
9
  _ = load_dotenv(find_dotenv())
11
10
 
12
- langtrace.init(write_spans_to_console=True)
11
+ langtrace.init()
13
12
 
14
13
  client = AsyncOpenAI()
15
14
 
@@ -30,6 +29,7 @@ def get_current_weather(location, unit="fahrenheit"):
30
29
  return json.dumps({"location": location, "temperature": "unknown"})
31
30
 
32
31
 
32
+ @with_langtrace_root_span("Run Conversation")
33
33
  async def run_conversation():
34
34
  # Step 1: send the conversation and available functions to the model
35
35
  messages = [
@@ -3,7 +3,7 @@ import json
3
3
  from dotenv import find_dotenv, load_dotenv
4
4
  from openai import AsyncOpenAI
5
5
 
6
- from langtrace_python_sdk import langtrace
6
+ from langtrace_python_sdk import langtrace, with_langtrace_root_span
7
7
 
8
8
  # from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
9
9
 
@@ -42,6 +42,7 @@ def get_current_time(location):
42
42
  return json.dumps({"location": location, "time": "unknown"})
43
43
 
44
44
 
45
+ @with_langtrace_root_span("Run Conversation Streaming")
45
46
  async def run_conversation():
46
47
  # Step 1: send the conversation and available functions to the model
47
48
  messages = [
@@ -9,11 +9,11 @@ from langtrace_python_sdk.utils.with_root_span import (
9
9
 
10
10
  _ = load_dotenv(find_dotenv())
11
11
 
12
- langtrace.init(write_spans_to_console=True)
12
+ langtrace.init(write_spans_to_console=False)
13
13
  client = OpenAI()
14
14
 
15
15
 
16
- # @with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
16
+ @with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
17
17
  def api():
18
18
  response = client.chat.completions.create(
19
19
  model="gpt-4",
@@ -27,7 +27,7 @@ def api():
27
27
  return response
28
28
 
29
29
 
30
- # @with_langtrace_root_span()
30
+ @with_langtrace_root_span("Chat Completion")
31
31
  def chat_completion():
32
32
  response = api()
33
33
  # print(response)
@@ -6,12 +6,12 @@ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
6
6
 
7
7
  _ = load_dotenv(find_dotenv())
8
8
 
9
- langtrace.init(write_spans_to_console=True)
9
+ langtrace.init(write_spans_to_console=False)
10
10
 
11
11
  client = OpenAI()
12
12
 
13
13
 
14
- @with_langtrace_root_span()
14
+ @with_langtrace_root_span("Embeddings Create")
15
15
  def embeddings_create():
16
16
  result = client.embeddings.create(
17
17
  model="text-embedding-ada-002",
@@ -3,11 +3,11 @@
3
3
  from dotenv import find_dotenv, load_dotenv
4
4
  from openai import OpenAI
5
5
 
6
- from langtrace_python_sdk import langtrace
6
+ from langtrace_python_sdk import langtrace, with_langtrace_root_span
7
7
 
8
8
  _ = load_dotenv(find_dotenv())
9
9
 
10
- langtrace.init(write_spans_to_console=True)
10
+ langtrace.init(write_spans_to_console=False)
11
11
 
12
12
 
13
13
  client = OpenAI()
@@ -34,6 +34,7 @@ student_custom_functions = [
34
34
  ]
35
35
 
36
36
 
37
+ @with_langtrace_root_span("Function Calling")
37
38
  def function_calling():
38
39
  response = client.chat.completions.create(
39
40
  model="gpt-3.5-turbo",
@@ -8,7 +8,7 @@ from langtrace_python_sdk import langtrace
8
8
 
9
9
  _ = load_dotenv(find_dotenv())
10
10
 
11
- langtrace.init(write_spans_to_console=True)
11
+ langtrace.init(write_spans_to_console=False)
12
12
 
13
13
 
14
14
  client = OpenAI()
@@ -36,5 +36,5 @@ def image_edit():
36
36
  print(response)
37
37
 
38
38
 
39
- image_edit()
39
+ # image_edit()
40
40
  # convert_to_rgba()
@@ -0,0 +1,9 @@
1
+ from langtrace_python_sdk import with_langtrace_root_span
2
+
3
+
4
+ class PineconeRunner:
5
+ @with_langtrace_root_span("Pinecone")
6
+ def run(self):
7
+ from .basic import basic as basic_app
8
+
9
+ basic_app()
@@ -6,7 +6,11 @@ from dotenv import find_dotenv, load_dotenv
6
6
  from openai import OpenAI
7
7
  from pinecone import Pinecone, ServerlessSpec
8
8
 
9
- from langtrace_python_sdk import langtrace, with_langtrace_root_span
9
+ from langtrace_python_sdk import (
10
+ langtrace,
11
+ with_langtrace_root_span,
12
+ with_additional_attributes,
13
+ )
10
14
  from langtrace_python_sdk.utils.with_root_span import SendUserFeedback
11
15
 
12
16
  _ = load_dotenv(find_dotenv())
@@ -28,7 +32,8 @@ def create_index():
28
32
  )
29
33
 
30
34
 
31
- @with_langtrace_root_span()
35
+ @with_additional_attributes({"db.embedding_model": "text-embedding-ada-002"})
36
+ @with_langtrace_root_span("Pinecone Basic")
32
37
  def basic(span_id=None, trace_id=None):
33
38
 
34
39
  result = client.embeddings.create(
@@ -0,0 +1,8 @@
1
+ from langtrace_python_sdk import with_langtrace_root_span
2
+ from .basic import basic as basic_app
3
+
4
+
5
+ class QdrantRunner:
6
+ @with_langtrace_root_span("Qdrant")
7
+ def run(self):
8
+ basic_app()
@@ -0,0 +1,26 @@
1
+ from .query_text import (
2
+ create,
3
+ insert,
4
+ query_data_bm25,
5
+ query_fetch_object_by_id,
6
+ query_fetch_objects,
7
+ query_hybrid,
8
+ query_near_object,
9
+ query_data_near_text,
10
+ query_data_near_vector,
11
+ )
12
+ from langtrace_python_sdk import with_langtrace_root_span
13
+
14
+
15
+ class WeaviateRunner:
16
+ @with_langtrace_root_span("Weaviate")
17
+ def run(self):
18
+ create()
19
+ insert()
20
+ query_data_bm25()
21
+ # query_fetch_object_by_id()
22
+ # query_fetch_objects()
23
+ # query_hybrid()
24
+ # query_near_object()
25
+ # query_data_near_text()
26
+ # query_data_near_vector()
@@ -21,7 +21,9 @@ from weaviate.collections.classes.grpc import Move
21
21
 
22
22
  import langtrace_python_sdk.langtrace as langtrace
23
23
  from langtrace_python_sdk import with_langtrace_root_span
24
+ from dotenv import load_dotenv
24
25
 
26
+ load_dotenv()
25
27
  # Set these environment variables
26
28
  WCS_DEMO_URL = os.environ["WCS_DEMO_URL"]
27
29
  WCS_DEMO_RO_KEY = os.environ["WCS_DEMO_RO_KEY"]
@@ -37,17 +39,19 @@ client = weaviate.connect_to_wcs(
37
39
  langtrace.init()
38
40
 
39
41
 
40
- @with_langtrace_root_span()
42
+ @with_langtrace_root_span("create")
41
43
  def create():
42
- questions = client.collections.create(
43
- name="Question",
44
- # Set the vectorizer to "text2vec-openai" to use the OpenAI API for vector-related operations
45
- vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_openai(),
46
- # Ensure the `generative-openai` module is used for generative queries
47
- generative_config=wvc.config.Configure.Generative.openai(),
48
- )
44
+ if not client.collections.get("Question"):
45
+ questions = client.collections.create(
46
+ name="Question",
47
+ # Set the vectorizer to "text2vec-openai" to use the OpenAI API for vector-related operations
48
+ vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_openai(),
49
+ # Ensure the `generative-openai` module is used for generative queries
50
+ generative_config=wvc.config.Configure.Generative.openai(),
51
+ )
49
52
 
50
53
 
54
+ @with_langtrace_root_span("insert")
51
55
  def insert():
52
56
  resp = requests.get(
53
57
  "https://raw.githubusercontent.com/weaviate-tutorials/quickstart/main/data/jeopardy_tiny.json"
@@ -15,13 +15,18 @@ limitations under the License.
15
15
  """
16
16
 
17
17
  from langtrace_python_sdk import langtrace
18
- from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
18
+ from langtrace_python_sdk.utils.with_root_span import (
19
+ with_langtrace_root_span,
20
+ with_additional_attributes,
21
+ )
22
+
19
23
  from langtrace_python_sdk.utils.prompt_registry import get_prompt_from_registry
20
24
  from langtrace_python_sdk.utils.with_root_span import SendUserFeedback
21
25
 
22
26
  __all__ = [
23
27
  "langtrace",
24
28
  "with_langtrace_root_span",
29
+ "with_additional_attributes",
25
30
  "get_prompt_from_registry",
26
31
  "SendUserFeedback",
27
32
  ]
@@ -0,0 +1 @@
1
+ __version__ = "2.1.14"