openlit 1.32.12__tar.gz → 1.33.2__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 (122) hide show
  1. {openlit-1.32.12 → openlit-1.33.2}/PKG-INFO +5 -4
  2. {openlit-1.32.12 → openlit-1.33.2}/README.md +3 -2
  3. {openlit-1.32.12 → openlit-1.33.2}/pyproject.toml +2 -2
  4. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/__init__.py +3 -1
  5. openlit-1.33.2/src/openlit/instrumentation/together/__init__.py +70 -0
  6. openlit-1.33.2/src/openlit/instrumentation/together/async_together.py +558 -0
  7. openlit-1.33.2/src/openlit/instrumentation/together/together.py +558 -0
  8. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/semcov/__init__.py +1 -0
  9. {openlit-1.32.12 → openlit-1.33.2}/LICENSE +0 -0
  10. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/__helpers.py +0 -0
  11. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/evals/__init__.py +0 -0
  12. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/evals/all.py +0 -0
  13. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/evals/bias_detection.py +0 -0
  14. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/evals/hallucination.py +0 -0
  15. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/evals/toxicity.py +0 -0
  16. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/evals/utils.py +0 -0
  17. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/guard/__init__.py +0 -0
  18. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/guard/all.py +0 -0
  19. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/guard/prompt_injection.py +0 -0
  20. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/guard/restrict_topic.py +0 -0
  21. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/guard/sensitive_topic.py +0 -0
  22. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/guard/utils.py +0 -0
  23. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/ag2/__init__.py +0 -0
  24. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/ag2/ag2.py +0 -0
  25. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/ai21/__init__.py +0 -0
  26. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/ai21/ai21.py +0 -0
  27. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/ai21/async_ai21.py +0 -0
  28. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/anthropic/__init__.py +0 -0
  29. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/anthropic/anthropic.py +0 -0
  30. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/anthropic/async_anthropic.py +0 -0
  31. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/assemblyai/__init__.py +0 -0
  32. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/assemblyai/assemblyai.py +0 -0
  33. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/astra/__init__.py +0 -0
  34. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/astra/astra.py +0 -0
  35. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/astra/async_astra.py +0 -0
  36. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/azure_ai_inference/__init__.py +0 -0
  37. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/azure_ai_inference/async_azure_ai_inference.py +0 -0
  38. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/azure_ai_inference/azure_ai_inference.py +0 -0
  39. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/bedrock/__init__.py +0 -0
  40. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/bedrock/bedrock.py +0 -0
  41. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/chroma/__init__.py +0 -0
  42. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/chroma/chroma.py +0 -0
  43. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/cohere/__init__.py +0 -0
  44. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/cohere/cohere.py +0 -0
  45. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/controlflow/__init__.py +0 -0
  46. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/controlflow/controlflow.py +0 -0
  47. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/crawl4ai/__init__.py +0 -0
  48. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/crawl4ai/async_crawl4ai.py +0 -0
  49. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/crawl4ai/crawl4ai.py +0 -0
  50. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/crewai/__init__.py +0 -0
  51. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/crewai/crewai.py +0 -0
  52. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/dynamiq/__init__.py +0 -0
  53. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/dynamiq/dynamiq.py +0 -0
  54. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/elevenlabs/__init__.py +0 -0
  55. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/elevenlabs/async_elevenlabs.py +0 -0
  56. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/elevenlabs/elevenlabs.py +0 -0
  57. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/embedchain/__init__.py +0 -0
  58. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/embedchain/embedchain.py +0 -0
  59. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/firecrawl/__init__.py +0 -0
  60. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/firecrawl/firecrawl.py +0 -0
  61. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/google_ai_studio/__init__.py +0 -0
  62. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/google_ai_studio/async_google_ai_studio.py +0 -0
  63. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/google_ai_studio/google_ai_studio.py +0 -0
  64. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/gpt4all/__init__.py +0 -0
  65. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/gpt4all/gpt4all.py +0 -0
  66. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/gpu/__init__.py +0 -0
  67. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/groq/__init__.py +0 -0
  68. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/groq/async_groq.py +0 -0
  69. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/groq/groq.py +0 -0
  70. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/haystack/__init__.py +0 -0
  71. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/haystack/haystack.py +0 -0
  72. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/julep/__init__.py +0 -0
  73. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/julep/async_julep.py +0 -0
  74. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/julep/julep.py +0 -0
  75. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/langchain/__init__.py +0 -0
  76. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/langchain/langchain.py +0 -0
  77. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/letta/__init__.py +0 -0
  78. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/letta/letta.py +0 -0
  79. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/litellm/__init__.py +0 -0
  80. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/litellm/async_litellm.py +0 -0
  81. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/litellm/litellm.py +0 -0
  82. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/llamaindex/__init__.py +0 -0
  83. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/llamaindex/llamaindex.py +0 -0
  84. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/mem0/__init__.py +0 -0
  85. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/mem0/mem0.py +0 -0
  86. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/milvus/__init__.py +0 -0
  87. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/milvus/milvus.py +0 -0
  88. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/mistral/__init__.py +0 -0
  89. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/mistral/async_mistral.py +0 -0
  90. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/mistral/mistral.py +0 -0
  91. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/multion/__init__.py +0 -0
  92. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/multion/async_multion.py +0 -0
  93. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/multion/multion.py +0 -0
  94. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/ollama/__init__.py +0 -0
  95. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/ollama/async_ollama.py +0 -0
  96. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/ollama/ollama.py +0 -0
  97. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/openai/__init__.py +0 -0
  98. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/openai/async_azure_openai.py +0 -0
  99. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/openai/async_openai.py +0 -0
  100. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/openai/azure_openai.py +0 -0
  101. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/openai/openai.py +0 -0
  102. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/phidata/__init__.py +0 -0
  103. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/phidata/phidata.py +0 -0
  104. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/pinecone/__init__.py +0 -0
  105. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/pinecone/pinecone.py +0 -0
  106. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/premai/__init__.py +0 -0
  107. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/premai/premai.py +0 -0
  108. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/qdrant/__init__.py +0 -0
  109. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/qdrant/async_qdrant.py +0 -0
  110. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/qdrant/qdrant.py +0 -0
  111. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/reka/__init__.py +0 -0
  112. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/reka/async_reka.py +0 -0
  113. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/reka/reka.py +0 -0
  114. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/transformers/__init__.py +0 -0
  115. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/transformers/transformers.py +0 -0
  116. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/vertexai/__init__.py +0 -0
  117. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/vertexai/async_vertexai.py +0 -0
  118. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/vertexai/vertexai.py +0 -0
  119. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/vllm/__init__.py +0 -0
  120. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/instrumentation/vllm/vllm.py +0 -0
  121. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/otel/metrics.py +0 -0
  122. {openlit-1.32.12 → openlit-1.33.2}/src/openlit/otel/tracing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openlit
3
- Version: 1.32.12
3
+ Version: 1.33.2
4
4
  Summary: OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications and GPUs, facilitating the integration of observability into your GenAI-driven projects
5
5
  Home-page: https://github.com/openlit/openlit/tree/main/openlit/python
6
6
  Keywords: OpenTelemetry,otel,otlp,llm,tracing,openai,anthropic,claude,cohere,llm monitoring,observability,monitoring,gpt,Generative AI,chatGPT,gpu
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
- Requires-Dist: anthropic (>=0.21.0,<0.22.0)
16
+ Requires-Dist: anthropic (>=0.42.0,<0.43.0)
17
17
  Requires-Dist: boto3 (>=1.34.0,<2.0.0)
18
18
  Requires-Dist: botocore (>=1.34.0,<2.0.0)
19
19
  Requires-Dist: openai (>=1.1.1,<2.0.0)
@@ -56,7 +56,7 @@ This project proudly follows and maintains the [Semantic Conventions](https://gi
56
56
 
57
57
  ## ⚡ Features
58
58
 
59
- - 🔎 **Auto Instrumentation**: Works with 40+ LLM providers, Agents, Vector databases, and GPUs with just one line of code.
59
+ - 🔎 **Auto Instrumentation**: Works with 50+ LLM providers, Agents, Vector databases, and GPUs with just one line of code.
60
60
  - 🔭 **OpenTelemetry-Native Observability SDKs**: Vendor-neutral SDKs that can send traces and metrics to your existing observability tool like Prometheus and Jaeger.
61
61
  - 💲 **Cost Tracking for Custom and Fine-Tuned Models**: Pass custom pricing files for accurate budgeting of custom and fine-tuned models.
62
62
  - 🚀 **Suppport for OpenLIT Features**: Includes suppprt for prompt management and secrets management features available in OpenLIT.
@@ -83,12 +83,13 @@ This project proudly follows and maintains the [Semantic Conventions](https://gi
83
83
  | [✅ vLLM](https://docs.openlit.io/latest/integrations/vllm) | | [✅ Crawl4AI](https://docs.openlit.io/latest/integrations/crawl4ai) | |
84
84
  | [✅ OLA Krutrim](https://docs.openlit.io/latest/integrations/krutrim) | | [✅ FireCrawl](https://docs.openlit.io/latest/integrations/firecrawl) | |
85
85
  | [✅ Google AI Studio](https://docs.openlit.io/latest/integrations/google-ai-studio) | | [✅ Letta](https://docs.openlit.io/latest/integrations/letta) | |
86
- | [✅ NVIDIA NIM](https://docs.openlit.io/latest/integrations/nvidia-nim) | | | |
86
+ | [✅ NVIDIA NIM](https://docs.openlit.io/latest/integrations/nvidia-nim) | | [✅ SwarmZero](https://docs.openlit.io/latest/integrations/swarmzero) | |
87
87
  | [✅ Titan ML](https://docs.openlit.io/latest/integrations/titan-ml) | | | |
88
88
  | [✅ Reka AI](https://docs.openlit.io/latest/integrations/reka) | | | |
89
89
  | [✅ xAI](https://docs.openlit.io/latest/integrations/xai) | | | |
90
90
  | [✅ Prem AI](https://docs.openlit.io/latest/integrations/premai) | | | |
91
91
  | [✅ Assembly AI](https://docs.openlit.io/latest/integrations/assemblyai) | | | |
92
+ | [✅ Together](https://docs.openlit.io/latest/integrations/together) | | | |
92
93
 
93
94
  ## Supported Destinations
94
95
  - [✅ OpenTelemetry Collector](https://docs.openlit.io/latest/connections/otelcol)
@@ -25,7 +25,7 @@ This project proudly follows and maintains the [Semantic Conventions](https://gi
25
25
 
26
26
  ## ⚡ Features
27
27
 
28
- - 🔎 **Auto Instrumentation**: Works with 40+ LLM providers, Agents, Vector databases, and GPUs with just one line of code.
28
+ - 🔎 **Auto Instrumentation**: Works with 50+ LLM providers, Agents, Vector databases, and GPUs with just one line of code.
29
29
  - 🔭 **OpenTelemetry-Native Observability SDKs**: Vendor-neutral SDKs that can send traces and metrics to your existing observability tool like Prometheus and Jaeger.
30
30
  - 💲 **Cost Tracking for Custom and Fine-Tuned Models**: Pass custom pricing files for accurate budgeting of custom and fine-tuned models.
31
31
  - 🚀 **Suppport for OpenLIT Features**: Includes suppprt for prompt management and secrets management features available in OpenLIT.
@@ -52,12 +52,13 @@ This project proudly follows and maintains the [Semantic Conventions](https://gi
52
52
  | [✅ vLLM](https://docs.openlit.io/latest/integrations/vllm) | | [✅ Crawl4AI](https://docs.openlit.io/latest/integrations/crawl4ai) | |
53
53
  | [✅ OLA Krutrim](https://docs.openlit.io/latest/integrations/krutrim) | | [✅ FireCrawl](https://docs.openlit.io/latest/integrations/firecrawl) | |
54
54
  | [✅ Google AI Studio](https://docs.openlit.io/latest/integrations/google-ai-studio) | | [✅ Letta](https://docs.openlit.io/latest/integrations/letta) | |
55
- | [✅ NVIDIA NIM](https://docs.openlit.io/latest/integrations/nvidia-nim) | | | |
55
+ | [✅ NVIDIA NIM](https://docs.openlit.io/latest/integrations/nvidia-nim) | | [✅ SwarmZero](https://docs.openlit.io/latest/integrations/swarmzero) | |
56
56
  | [✅ Titan ML](https://docs.openlit.io/latest/integrations/titan-ml) | | | |
57
57
  | [✅ Reka AI](https://docs.openlit.io/latest/integrations/reka) | | | |
58
58
  | [✅ xAI](https://docs.openlit.io/latest/integrations/xai) | | | |
59
59
  | [✅ Prem AI](https://docs.openlit.io/latest/integrations/premai) | | | |
60
60
  | [✅ Assembly AI](https://docs.openlit.io/latest/integrations/assemblyai) | | | |
61
+ | [✅ Together](https://docs.openlit.io/latest/integrations/together) | | | |
61
62
 
62
63
  ## Supported Destinations
63
64
  - [✅ OpenTelemetry Collector](https://docs.openlit.io/latest/connections/otelcol)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "openlit"
3
- version = "1.32.12"
3
+ version = "1.33.2"
4
4
  description = "OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications and GPUs, facilitating the integration of observability into your GenAI-driven projects"
5
5
  authors = ["OpenLIT"]
6
6
  repository = "https://github.com/openlit/openlit/tree/main/openlit/python"
@@ -22,7 +22,7 @@ opentelemetry-sdk = "^1.27.0"
22
22
  opentelemetry-exporter-otlp = "^1.27.0"
23
23
  opentelemetry-instrumentation = "^0.48b0"
24
24
  openai = "^1.1.1"
25
- anthropic = "^0.21.0"
25
+ anthropic = "^0.42.0"
26
26
 
27
27
  [build-system]
28
28
  requires = ["poetry-core>=1.1.0"]
@@ -52,6 +52,7 @@ from openlit.instrumentation.milvus import MilvusInstrumentor
52
52
  from openlit.instrumentation.astra import AstraInstrumentor
53
53
  from openlit.instrumentation.transformers import TransformersInstrumentor
54
54
  from openlit.instrumentation.litellm import LiteLLMInstrumentor
55
+ from openlit.instrumentation.together import TogetherInstrumentor
55
56
  from openlit.instrumentation.crewai import CrewAIInstrumentor
56
57
  from openlit.instrumentation.ag2 import AG2Instrumentor
57
58
  from openlit.instrumentation.multion import MultiOnInstrumentor
@@ -188,7 +189,6 @@ def instrument_if_available(
188
189
  metrics_dict=config.metrics_dict,
189
190
  disable_metrics=config.disable_metrics,
190
191
  )
191
- logger.info("Instrumented %s", instrumentor_name)
192
192
  else:
193
193
  # pylint: disable=line-too-long
194
194
  logger.info("Library for %s (%s) not found. Skipping instrumentation", instrumentor_name, module_name)
@@ -264,6 +264,7 @@ def init(environment="default", application_name="default", tracer=None, otlp_en
264
264
  "crawl4ai": "crawl4ai",
265
265
  "firecrawl": "firecrawl",
266
266
  "letta": "letta",
267
+ "together": "together",
267
268
  }
268
269
 
269
270
  invalid_instrumentors = [
@@ -360,6 +361,7 @@ def init(environment="default", application_name="default", tracer=None, otlp_en
360
361
  "crawl4ai": Crawl4AIInstrumentor(),
361
362
  "firecrawl": FireCrawlInstrumentor(),
362
363
  "letta": LettaInstrumentor(),
364
+ "together": TogetherInstrumentor(),
363
365
  }
364
366
 
365
367
  # Initialize and instrument only the enabled instrumentors
@@ -0,0 +1,70 @@
1
+ # pylint: disable=useless-return, bad-staticmethod-argument, disable=duplicate-code
2
+ """Initializer of Auto Instrumentation of Together AI Functions"""
3
+
4
+ from typing import Collection
5
+ import importlib.metadata
6
+ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
7
+ from wrapt import wrap_function_wrapper
8
+
9
+ from openlit.instrumentation.together.together import (
10
+ completion, image_generate
11
+ )
12
+ from openlit.instrumentation.together.async_together import (
13
+ async_completion, async_image_generate
14
+ )
15
+
16
+ _instruments = ("together >= 1.3.5",)
17
+
18
+ class TogetherInstrumentor(BaseInstrumentor):
19
+ """
20
+ An instrumentor for Together's client library.
21
+ """
22
+
23
+ def instrumentation_dependencies(self) -> Collection[str]:
24
+ return _instruments
25
+
26
+ def _instrument(self, **kwargs):
27
+ application_name = kwargs.get("application_name", "default_application")
28
+ environment = kwargs.get("environment", "default_environment")
29
+ tracer = kwargs.get("tracer")
30
+ metrics = kwargs.get("metrics_dict")
31
+ pricing_info = kwargs.get("pricing_info", {})
32
+ trace_content = kwargs.get("trace_content", False)
33
+ disable_metrics = kwargs.get("disable_metrics")
34
+ version = importlib.metadata.version("together")
35
+
36
+ # Chat completions
37
+ wrap_function_wrapper(
38
+ "together.resources.chat.completions",
39
+ "ChatCompletions.create",
40
+ completion("together.chat.completions", version, environment, application_name,
41
+ tracer, pricing_info, trace_content, metrics, disable_metrics),
42
+ )
43
+
44
+ # Image generate
45
+ wrap_function_wrapper(
46
+ "together.resources.images",
47
+ "Images.generate",
48
+ image_generate("together.image.generate", version, environment, application_name,
49
+ tracer, pricing_info, trace_content, metrics, disable_metrics),
50
+ )
51
+
52
+ # Chat completions
53
+ wrap_function_wrapper(
54
+ "together.resources.chat.completions",
55
+ "AsyncChatCompletions.create",
56
+ async_completion("together.chat.completions", version, environment, application_name,
57
+ tracer, pricing_info, trace_content, metrics, disable_metrics),
58
+ )
59
+
60
+ # Image generate
61
+ wrap_function_wrapper(
62
+ "together.resources.images",
63
+ "AsyncImages.generate",
64
+ async_image_generate("together.image.generate", version, environment, application_name,
65
+ tracer, pricing_info, trace_content, metrics, disable_metrics),
66
+ )
67
+
68
+ def _uninstrument(self, **kwargs):
69
+ # Proper uninstrumentation logic to revert patched methods
70
+ pass