openlit 1.26.0__py3-none-any.whl → 1.27.0__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openlit
3
- Version: 1.26.0
3
+ Version: 1.27.0
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,9 +13,11 @@ 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
17
  Requires-Dist: boto3 (>=1.34.0,<2.0.0)
17
18
  Requires-Dist: botocore (>=1.34.0,<2.0.0)
18
19
  Requires-Dist: gpustat (>=1.1.1,<2.0.0)
20
+ Requires-Dist: openai (>=1.1.1,<2.0.0)
19
21
  Requires-Dist: opentelemetry-api (>=1.27.0,<2.0.0)
20
22
  Requires-Dist: opentelemetry-exporter-otlp (>=1.27.0,<2.0.0)
21
23
  Requires-Dist: opentelemetry-instrumentation (>=0.48b0,<0.49)
@@ -27,10 +29,11 @@ Project-URL: Repository, https://github.com/openlit/openlit/tree/main/openlit/py
27
29
  Description-Content-Type: text/markdown
28
30
 
29
31
  <div align="center">
30
- <img src="https://github.com/openlit/.github/blob/main/profile/assets/wide-logo-no-bg.png?raw=true" alt="OpenLIT Logo" width="30%"><h1>
31
- OpenTelemetry Auto-Instrumentation for GenAI & LLM Applications</h1>
32
+ <img src="https://github.com/openlit/.github/blob/main/profile/assets/wide-logo-no-bg.png?raw=true" alt="OpenLIT Logo" width="30%">
33
+ <h3>OpenTelemetry-native</h3>
34
+ <h1>AI Observability, Evaluation and Guardrails Framework</h1>
32
35
 
33
- **[Documentation](https://docs.openlit.io/) | [Quickstart](#-getting-started) | [Python SDK](https://github.com/openlit/openlit/tree/main/sdk/python)**
36
+ **[Documentation](https://docs.openlit.io/) | [Quickstart](#-getting-started-with-llm-observability) | [Roadmap](#️-roadmap) | [Feature Request](https://github.com/openlit/openlit/issues/new?assignees=&labels=%3Araised_hand%3A+Up+for+Grabs%2C+%3Arocket%3A+Feature&projects=&template=feature-request.md&title=%5BFeat%5D%3A) | [Report a Bug](https://github.com/openlit/openlit/issues/new?assignees=&labels=%3Abug%3A+Bug%2C+%3Araised_hand%3A+Up+for+Grabs&projects=&template=bug.md&title=%5BBug%5D%3A)**
34
37
 
35
38
  [![OpenLIT](https://img.shields.io/badge/OpenLIT-orange)](https://github.com/openlit/openlit)
36
39
  [![License](https://img.shields.io/github/license/openlit/openlit?label=License&logo=github&color=f80&logoColor=white)](https://github.com/openlit/openlit/blob/main/LICENSE)
@@ -39,7 +42,6 @@ OpenTelemetry Auto-Instrumentation for GenAI & LLM Applications</h1>
39
42
  [![GitHub Contributors](https://img.shields.io/github/contributors/openlit/openlit)](https://github.com/openlit/openlit/graphs/contributors)
40
43
 
41
44
  [![Slack](https://img.shields.io/badge/Slack-4A154B?logo=slack&logoColor=white)](https://join.slack.com/t/openlit/shared_invite/zt-2etnfttwg-TjP_7BZXfYg84oAukY8QRQ)
42
- [![Discord](https://img.shields.io/badge/Discord-7289DA?logo=discord&logoColor=white)](https://discord.gg/CQnXwNT3)
43
45
  [![X](https://img.shields.io/badge/follow-%40openlit__io-1DA1F2?logo=x&style=social)](https://twitter.com/openlit_io)
44
46
 
45
47
  ![OpenLIT Connections Banner](https://github.com/openlit/.github/blob/main/profile/assets/github-readme-connections-banner.png?raw=true)
@@ -47,11 +49,16 @@ OpenTelemetry Auto-Instrumentation for GenAI & LLM Applications</h1>
47
49
 
48
50
  </div>
49
51
 
50
- OpenLIT Python SDK is an **OpenTelemetry-native** Auto instrumentation library for monitoring LLM Applications, facilitating the integration of observability into your GenAI-driven projects. Designed with simplicity and efficiency, OpenLIT offers the ability to embed observability into your GenAI-driven projects effortlessly using just **a single line of code**.
52
+ OpenLIT SDK is a monitoring framework built on top of **OpenTelemetry** that gives your complete Observability for your AI stack, from LLMs to vector databases and GPUs, with just one line of code with tracing and metrics. It also allows you to send the generated traces and metrics to your existing monitoring tools like Grafana, New Relic, and more.
51
53
 
52
- Whether you're directly using LLM Libraries like OpenAI, Anthropic or building complex RAG Agents using Langchain, OpenLIT seamlessly integrates observability into your applications, ensuring enhanced performance and reliability across diverse scenarios.
54
+ This project proudly follows and maintains the [Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/tree/main/docs/gen-ai) with the OpenTelemetry community, consistently updating to align with the latest standards in Observability.
53
55
 
54
- This project adheres to the [Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/tree/main/docs/gen-ai) proposed by the OpenTelemetry community. You can check out the current definitions [here](src/openlit/semcov/__init__.py).
56
+ ## Features
57
+
58
+ - 🔎 **Auto Instrumentation**: Works with 30+ LLM providers, vector databases, and GPUs with just one line of code.
59
+ - 🔭 **OpenTelemetry-Native Observability SDKs**: Vendor-neutral SDKs that can send traces and metrics to your existing observability tool like Prometheus and Jaeger.
60
+ - 💲 **Cost Tracking for Custom and Fine-Tuned Models**: Pass custom pricing files for accurate budgeting of custom and fine-tuned models.
61
+ - 🚀 **Suppport for OpenLIT Features**: Includes suppprt for prompt management and secrets management features available in OpenLIT.
55
62
 
56
63
  ## Auto Instrumentation Capabilities
57
64
 
@@ -97,9 +104,9 @@ This project adheres to the [Semantic Conventions](https://github.com/open-telem
97
104
  pip install openlit
98
105
  ```
99
106
 
100
- ## 🚀 Getting Started
107
+ ## 🚀 Getting Started with LLM Observability
101
108
 
102
- ### Step 1: Install OpenLIT
109
+ ### Step 1: Install OpenLIT SDK
103
110
 
104
111
  Open your command line or terminal and run:
105
112
 
@@ -108,7 +115,7 @@ pip install openlit
108
115
  ```
109
116
 
110
117
  ### Step 2: Initialize OpenLIT in your Application
111
- Integrating the OpenLIT into LLM applications is straightforward. Start monitoring for your LLM Application with just **two lines of code**:
118
+ Integrate OpenLIT into your AI applications by adding the following lines to your code.
112
119
 
113
120
  ```python
114
121
  import openlit
@@ -116,11 +123,14 @@ import openlit
116
123
  openlit.init()
117
124
  ```
118
125
 
119
- To forward telemetry data to an HTTP OTLP endpoint, such as the OpenTelemetry Collector, set the `otlp_endpoint` parameter with the desired endpoint. Alternatively, you can configure the endpoint by setting the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable as recommended in the OpenTelemetry documentation.
126
+ Configure the telemetry data destination as follows:
120
127
 
121
- > 💡 Info: If you dont provide `otlp_endpoint` function argument or set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable, OpenLIT directs the trace directly to your console, which can be useful during development.
128
+ | Purpose | Parameter/Environment Variable | For Sending to OpenLIT |
129
+ |-------------------------------------------|--------------------------------------------------|--------------------------------|
130
+ | Send data to an HTTP OTLP endpoint | `otlp_endpoint` or `OTEL_EXPORTER_OTLP_ENDPOINT` | `"http://127.0.0.1:4318"` |
131
+ | Authenticate telemetry backends | `otlp_headers` or `OTEL_EXPORTER_OTLP_HEADERS` | Not required by default |
122
132
 
123
- To send telemetry to OpenTelemetry backends requiring authentication, set the `otlp_headers` parameter with its desired value. Alternatively, you can configure the endpoint by setting the `OTEL_EXPORTER_OTLP_HEADERS` environment variable as recommended in the OpenTelemetry documentation.
133
+ > 💡 Info: If the `otlp_endpoint` or `OTEL_EXPORTER_OTLP_ENDPOINT` is not provided, the OpenLIT SDK will output traces directly to your console, which is recommended during the development phase.
124
134
 
125
135
  #### Example
126
136
 
@@ -171,19 +181,22 @@ To send telemetry to OpenTelemetry backends requiring authentication, set the `o
171
181
  ---
172
182
 
173
183
  ### Step 3: Visualize and Optimize!
174
- With the LLM Observability data now being collected and sent to OpenLIT, the next step is to visualize and analyze this data to get insights into your LLM applications performance, behavior, and identify areas of improvement.
184
+ Now that your LLM observability data is being collected and sent to configured OpenTelemetry destination, the next step is to visualize and analyze this data. This will help you understand your LLM application's performance and behavior and identify where it can be improved.
175
185
 
176
- To begin exploring your LLM Application's performance data within the OpenLIT, please see the [Quickstart Guide](https://docs.openlit.io/latest/quickstart).
186
+ If you want to use OpenLIT's Observability Dashboard to monitor LLM usage—like cost, tokens, and user interactions—please check out our [Quickstart Guide](https://docs.openlit.io/latest/quickstart).
177
187
 
178
- If you want to integrate and send metrics and traces to your existing observability tools, refer to our [Connections Guide](https://docs.openlit.io/latest/connections/intro) for detailed instructions.
188
+ If you're sending metrics and traces to other observability tools, take a look at our [Connections Guide](https://docs.openlit.io/latest/connections/intro) to start using a pre-built dashboard we have created for these tools.
179
189
 
180
190
  ![](https://github.com/openlit/.github/blob/main/profile/assets/openlit-client-1.png?raw=true)
181
191
 
182
192
 
183
- ### Configuration
193
+ ## Configuration
194
+
195
+ ### Observability - `openlit.init()`
184
196
 
185
197
  Below is a detailed overview of the configuration options available, allowing you to adjust OpenLIT's behavior and functionality to align with your specific observability needs:
186
198
 
199
+
187
200
  | Argument | Description | Default Value | Required |
188
201
  |-------------------------|-----------------------------------------------------------------------------------------------|----------------|----------|
189
202
  | `environment` | The deployment environment of the application. | `"default"` | Yes |
@@ -199,6 +212,49 @@ Below is a detailed overview of the configuration options available, allowing yo
199
212
  | `pricing_json` | URL or file path of the pricing JSON file. | `https://github.com/openlit/openlit/blob/main/assets/pricing.json` | No |
200
213
  | `collect_gpu_stats` | Flag to enable or disable GPU metrics collection. | `False` | No |
201
214
 
215
+ ### OpenLIT Prompt Hub - `openlit.get_prompt()`
216
+
217
+ Below are the parameters for use with the SDK for OpenLIT Prompt Hub for prompt management:
218
+
219
+ | Parameter | Description |
220
+ |-------------------|------------------------------------------------------------------------------------------------------------------------------------|
221
+ | `url` | Sets the OpenLIT URL. Defaults to the `OPENLIT_URL` environment variable. |
222
+ | `api_key` | Sets the OpenLIT API Key. Can also be provided via the `OPENLIT_API_KEY` environment variable. |
223
+ | `name` | Sets the name to fetch a unique prompt. Use this or `prompt_id`. |
224
+ | `prompt_id` | Sets the ID to fetch a unique prompt. Use this or `name`. Optional |
225
+ | `version` | Set to `True` to get the prompt with variable substitution.. Optional |
226
+ | `shouldCompile` | Boolean value that compiles the prompt using the provided variables. Optional |
227
+ | `variables` | Sets the variables for prompt compilation. Optional |
228
+ | `meta_properties` | Sets the meta-properties for storing in the prompt's access history metadata. Optional |
229
+
230
+ ### OpenLIT Vault - `openlit.get_secrets()`
231
+
232
+ Below are the parameters for use with the SDK for OpenLIT Vault for secret management:
233
+
234
+ | Parameter | Description |
235
+ |-------------------|------------------------------------------------------------------------------------------------------------------------------------|
236
+ | `url` | Sets the Openlit URL. Defaults to the `OPENLIT_URL` environment variable. |
237
+ | `api_key` | Sets the OpenLIT API Key. Can also be provided via the `OPENLIT_API_KEY` environment variable. |
238
+ | `key` | Sets the key to fetch a specific secret. Optional |
239
+ | `should_set_env` | Boolean value that sets all the secrets as environment variables for the application. Optional |
240
+ | `tags` | Sets the tags for fetching only the secrets that have the mentioned tags assigned. Optional |
241
+
242
+
243
+ ## 🛣️ Roadmap
244
+
245
+ We are dedicated to continuously improving OpenLIT SDKs. Here's a look at what's been accomplished and what's on the horizon:
246
+
247
+ | Feature | Status |
248
+ |----------------------------------------------------------------------------------------------|---------------|
249
+ | [OpenTelmetry auto-instrumentation for LLM Providers like OpenAI, Anthropic]() | ✅ Completed |
250
+ | [OpenTelmetry auto-instrumentation for Vector databases like Pinecone, Chroma]() | ✅ Completed |
251
+ | [OpenTelmetry auto-instrumentation for LLM Frameworks like LangChain, LlamaIndex]() | ✅ Completed |
252
+ | [OpenTelemetry-native auto-instrumentation for NVIDIA GPU Monitoring](https://docs.openlit.io/latest/features/gpu) | ✅ Completed |
253
+ | [Real-Time Guardrails Implementation](https://docs.openlit.io/latest/features/guardrails) | ✅ Completed |
254
+ | [Programmatic Evaluation for LLM Response](https://docs.openlit.io/latest/features/evaluations) | ✅ Completed |
255
+ | [OpenTelmetry auto-instrumentation for Agent Frameworks like CrewAI, DsPy]() | 🔜 Coming Soon |
256
+
257
+
202
258
  ## 🌱 Contributing
203
259
 
204
260
  Whether it's big or small, we love contributions 💚. Check out our [Contribution guide](../../CONTRIBUTING.md) to get started
@@ -1,5 +1,17 @@
1
1
  openlit/__helpers.py,sha256=H-8uJKs_CP9Y2HL4lz5n0AgN60wwZ675hlWHMDO143A,5936
2
- openlit/__init__.py,sha256=MMQriKcROfw0DBBC3FdHbOKI--9tq-ZM0pY6UsQvjGk,19287
2
+ openlit/__init__.py,sha256=LbaoEj0c0mp_qvDwl3KmNsrYkMQfvS_1Ye-XN367P-g,19329
3
+ openlit/evals/__init__.py,sha256=nJe99nuLo1b5rf7pt9U9BCdSDedzbVi2Fj96cgl7msM,380
4
+ openlit/evals/all.py,sha256=oWrue3PotE-rB5WePG3MRYSA-ro6WivkclSHjYlAqGs,7154
5
+ openlit/evals/bias_detection.py,sha256=mCdsfK7x1vX7S3psC3g641IMlZ-7df3h-V6eiICj5N8,8154
6
+ openlit/evals/hallucination.py,sha256=Yn5OfWVJKynAiImV_aAqCvc0zqYjdJ3XUppCnMTy1pg,7507
7
+ openlit/evals/toxicity.py,sha256=Ii_kX2GToO9fDstDBuK4iN0tEQUkMoPWUBDMFFfeMC4,7000
8
+ openlit/evals/utils.py,sha256=XfSiD7IknWKl96NwmeMDgtVHYc39I49--R0I65DFivU,8346
9
+ openlit/guard/__init__.py,sha256=B-D7iPadGFn5i7nEsQfVbS6feL1ViRht3zWTQ45Jgkg,417
10
+ openlit/guard/all.py,sha256=VNHQERad-4qAMWsJJrpW9QNkhM7U8v_wy20KtDtQgzM,9755
11
+ openlit/guard/prompt_injection.py,sha256=3e4DKxB7QDzM-xPCpwEuureiH_2s_OTJ9BSckknPpzY,5784
12
+ openlit/guard/restrict_topic.py,sha256=KTuWa7XeMsV4oXxOrD1CYZV0wXWxTfA0H3p_6q_IOsk,6444
13
+ openlit/guard/sensitive_topic.py,sha256=RgVw_laFERv0nNdzBsAd2_3yLomMOK-gVq-P7oj1bTk,5552
14
+ openlit/guard/utils.py,sha256=0UcbNOTVu6Zv-LNY7480uqa-VrObCCOc41m-ZXRwpFI,7536
3
15
  openlit/instrumentation/anthropic/__init__.py,sha256=oaU53BOPyfUKbEzYvLr1DPymDluurSnwo4Hernf2XdU,1955
4
16
  openlit/instrumentation/anthropic/anthropic.py,sha256=y7CEGhKOGHWt8G_5Phr4qPJTfPGRJIAr9Yk6nM3CcvM,16775
5
17
  openlit/instrumentation/anthropic/async_anthropic.py,sha256=Zz1KRKIG9wGn0quOoLvjORC-49IvHQpJ6GBdB-4PfCQ,16816
@@ -58,8 +70,8 @@ openlit/instrumentation/vllm/__init__.py,sha256=OVWalQ1dXvip1DUsjUGaHX4J-2FrSp-T
58
70
  openlit/instrumentation/vllm/vllm.py,sha256=lDzM7F5pgxvh8nKL0dcKB4TD0Mc9wXOWeXOsOGN7Wd8,6527
59
71
  openlit/otel/metrics.py,sha256=-PntPlH4xOBXgnDqgJp3iA7rh1TWxM7PudGnb0GxVDA,4298
60
72
  openlit/otel/tracing.py,sha256=2kSj7n7uXSkRegcGFDC8IbnDOxqWTA8dGODs__Yn_yA,3719
61
- openlit/semcov/__init__.py,sha256=wpAarrnkndbgvP8VSudi8IRInYtD02hkewqjyiC0dMk,7614
62
- openlit-1.26.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
63
- openlit-1.26.0.dist-info/METADATA,sha256=YRmexsUEdSEe5MBZu8IR6u6s4XMzi2TSJGw1Z7CMCgQ,15758
64
- openlit-1.26.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
65
- openlit-1.26.0.dist-info/RECORD,,
73
+ openlit/semcov/__init__.py,sha256=xPsw1aPonDSGYVuga-ZdoGt4yyA16wNFi5AEc7_xIrQ,8114
74
+ openlit-1.27.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
75
+ openlit-1.27.0.dist-info/METADATA,sha256=_Tiz8HXJ53yWZm4BGY8-em1n1H45OECLfekbQPgx7O8,20749
76
+ openlit-1.27.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
77
+ openlit-1.27.0.dist-info/RECORD,,