lmnr 0.4.15b1__py3-none-any.whl → 0.4.16__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.
- lmnr/sdk/decorators.py +9 -8
- {lmnr-0.4.15b1.dist-info → lmnr-0.4.16.dist-info}/METADATA +27 -28
- {lmnr-0.4.15b1.dist-info → lmnr-0.4.16.dist-info}/RECORD +6 -6
- {lmnr-0.4.15b1.dist-info → lmnr-0.4.16.dist-info}/LICENSE +0 -0
- {lmnr-0.4.15b1.dist-info → lmnr-0.4.16.dist-info}/WHEEL +0 -0
- {lmnr-0.4.15b1.dist-info → lmnr-0.4.16.dist-info}/entry_points.txt +0 -0
lmnr/sdk/decorators.py
CHANGED
@@ -4,7 +4,8 @@ from lmnr.traceloop_sdk.decorators.base import (
|
|
4
4
|
)
|
5
5
|
from opentelemetry.trace import INVALID_SPAN, get_current_span
|
6
6
|
|
7
|
-
from typing import Callable, Optional, cast
|
7
|
+
from typing import Callable, Optional, TypeVar, cast
|
8
|
+
from typing_extensions import ParamSpec
|
8
9
|
|
9
10
|
from lmnr.traceloop_sdk.tracing.attributes import SESSION_ID, USER_ID
|
10
11
|
from lmnr.traceloop_sdk.tracing.tracing import update_association_properties
|
@@ -12,12 +13,16 @@ from lmnr.traceloop_sdk.tracing.tracing import update_association_properties
|
|
12
13
|
from .utils import is_async
|
13
14
|
|
14
15
|
|
16
|
+
P = ParamSpec("P")
|
17
|
+
R = TypeVar("R")
|
18
|
+
|
19
|
+
|
15
20
|
def observe(
|
16
21
|
*,
|
17
22
|
name: Optional[str] = None,
|
18
23
|
user_id: Optional[str] = None,
|
19
24
|
session_id: Optional[str] = None,
|
20
|
-
) -> Callable[[Callable], Callable]:
|
25
|
+
) -> Callable[[Callable[P, R]], Callable[P, R]]:
|
21
26
|
"""The main decorator entrypoint for Laminar. This is used to wrap
|
22
27
|
functions and methods to create spans.
|
23
28
|
|
@@ -43,13 +48,9 @@ def observe(
|
|
43
48
|
current_span = get_current_span()
|
44
49
|
if current_span != INVALID_SPAN:
|
45
50
|
if session_id is not None:
|
46
|
-
current_span.set_attribute(
|
47
|
-
SESSION_ID, session_id
|
48
|
-
)
|
51
|
+
current_span.set_attribute(SESSION_ID, session_id)
|
49
52
|
if user_id is not None:
|
50
|
-
current_span.set_attribute(
|
51
|
-
USER_ID, user_id
|
52
|
-
)
|
53
|
+
current_span.set_attribute(USER_ID, user_id)
|
53
54
|
association_properties = {}
|
54
55
|
if session_id is not None:
|
55
56
|
association_properties["session_id"] = session_id
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lmnr
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.16
|
4
4
|
Summary: Python SDK for Laminar AI
|
5
5
|
License: Apache-2.0
|
6
6
|
Author: lmnr.ai
|
@@ -17,39 +17,38 @@ Requires-Dist: backoff (>=2.0,<3.0)
|
|
17
17
|
Requires-Dist: deprecated (>=1.0,<2.0)
|
18
18
|
Requires-Dist: jinja2 (>=3.0,<4.0)
|
19
19
|
Requires-Dist: opentelemetry-api (>=1.27.0,<2.0.0)
|
20
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.
|
21
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.
|
22
|
-
Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.
|
23
|
-
Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.
|
24
|
-
Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.
|
25
|
-
Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.
|
26
|
-
Requires-Dist: opentelemetry-instrumentation-cohere (>=0.
|
27
|
-
Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.
|
28
|
-
Requires-Dist: opentelemetry-instrumentation-groq (>=0.
|
29
|
-
Requires-Dist: opentelemetry-instrumentation-haystack (>=0.
|
30
|
-
Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.
|
31
|
-
Requires-Dist: opentelemetry-instrumentation-langchain (>=0.
|
32
|
-
Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.
|
33
|
-
Requires-Dist: opentelemetry-instrumentation-marqo (>=0.
|
34
|
-
Requires-Dist: opentelemetry-instrumentation-milvus (>=0.
|
35
|
-
Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.
|
36
|
-
Requires-Dist: opentelemetry-instrumentation-ollama (>=0.
|
37
|
-
Requires-Dist: opentelemetry-instrumentation-openai (>=0.
|
38
|
-
Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.
|
39
|
-
Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.
|
40
|
-
Requires-Dist: opentelemetry-instrumentation-replicate (>=0.
|
20
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.27.0,<2.0.0)
|
21
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.27.0,<2.0.0)
|
22
|
+
Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.32.0)
|
23
|
+
Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.32.0)
|
24
|
+
Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.32.0)
|
25
|
+
Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.32.0)
|
26
|
+
Requires-Dist: opentelemetry-instrumentation-cohere (>=0.32.0)
|
27
|
+
Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.32.0)
|
28
|
+
Requires-Dist: opentelemetry-instrumentation-groq (>=0.32.0)
|
29
|
+
Requires-Dist: opentelemetry-instrumentation-haystack (>=0.32.0)
|
30
|
+
Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.32.0)
|
31
|
+
Requires-Dist: opentelemetry-instrumentation-langchain (>=0.32.0)
|
32
|
+
Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.32.0)
|
33
|
+
Requires-Dist: opentelemetry-instrumentation-marqo (>=0.32.0)
|
34
|
+
Requires-Dist: opentelemetry-instrumentation-milvus (>=0.32.0)
|
35
|
+
Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.32.0)
|
36
|
+
Requires-Dist: opentelemetry-instrumentation-ollama (>=0.32.0)
|
37
|
+
Requires-Dist: opentelemetry-instrumentation-openai (>=0.32.0)
|
38
|
+
Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.32.0)
|
39
|
+
Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.32.0)
|
40
|
+
Requires-Dist: opentelemetry-instrumentation-replicate (>=0.32.0)
|
41
41
|
Requires-Dist: opentelemetry-instrumentation-requests (>=0.48b0,<0.49)
|
42
42
|
Requires-Dist: opentelemetry-instrumentation-sqlalchemy (>=0.48b0,<0.49)
|
43
43
|
Requires-Dist: opentelemetry-instrumentation-threading (>=0.48b0,<0.49)
|
44
|
-
Requires-Dist: opentelemetry-instrumentation-together (>=0.
|
45
|
-
Requires-Dist: opentelemetry-instrumentation-transformers (>=0.
|
44
|
+
Requires-Dist: opentelemetry-instrumentation-together (>=0.20.0)
|
45
|
+
Requires-Dist: opentelemetry-instrumentation-transformers (>=0.32.0)
|
46
46
|
Requires-Dist: opentelemetry-instrumentation-urllib3 (>=0.48b0,<0.49)
|
47
|
-
Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.
|
48
|
-
Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.
|
49
|
-
Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.
|
47
|
+
Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.32.0)
|
48
|
+
Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.32.0)
|
49
|
+
Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.32.0)
|
50
50
|
Requires-Dist: opentelemetry-sdk (>=1.27.0,<2.0.0)
|
51
51
|
Requires-Dist: opentelemetry-semantic-conventions-ai (==0.4.1)
|
52
|
-
Requires-Dist: posthog (>=3.0,<4.0)
|
53
52
|
Requires-Dist: pydantic (>=2.7,<3.0)
|
54
53
|
Requires-Dist: python-dotenv (>=1.0,<2.0)
|
55
54
|
Requires-Dist: requests (>=2.0,<3.0)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
lmnr/__init__.py,sha256=5Ks8UIicCzCBgwSz0MOX3I7jVruPMUO3SmxIwUoODzQ,231
|
2
2
|
lmnr/cli.py,sha256=Ptvm5dsNLKUY5lwnN8XkT5GtCYjzpRNi2WvefknB3OQ,1079
|
3
3
|
lmnr/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
lmnr/sdk/decorators.py,sha256=
|
4
|
+
lmnr/sdk/decorators.py,sha256=ZSDaEZyjo-RUzRCltsNbe6x0t9SKl2xRQ2q4uaKvXtk,2250
|
5
5
|
lmnr/sdk/evaluations.py,sha256=Tukl2pW_x13ittzG5XQpF1TweYo3fpD4eLInplQ4YYI,14152
|
6
6
|
lmnr/sdk/laminar.py,sha256=d5Vn0eSVIoI_SxFcTh71T-_w7_E_odvFDFiLU2YwzZo,16509
|
7
7
|
lmnr/sdk/log.py,sha256=EgAMY77Zn1bv1imCqrmflD3imoAJ2yveOkIcrIP3e98,1170
|
@@ -44,8 +44,8 @@ lmnr/traceloop_sdk/utils/in_memory_span_exporter.py,sha256=H_4TRaThMO1H6vUQ0OpQv
|
|
44
44
|
lmnr/traceloop_sdk/utils/json_encoder.py,sha256=dK6b_axr70IYL7Vv-bu4wntvDDuyntoqsHaddqX7P58,463
|
45
45
|
lmnr/traceloop_sdk/utils/package_check.py,sha256=TZSngzJOpFhfUZLXIs38cpMxQiZSmp0D-sCrIyhz7BA,251
|
46
46
|
lmnr/traceloop_sdk/version.py,sha256=OlatFEFA4ttqSSIiV8jdE-sq3KG5zu2hnC4B4mzWF3s,23
|
47
|
-
lmnr-0.4.
|
48
|
-
lmnr-0.4.
|
49
|
-
lmnr-0.4.
|
50
|
-
lmnr-0.4.
|
51
|
-
lmnr-0.4.
|
47
|
+
lmnr-0.4.16.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
|
48
|
+
lmnr-0.4.16.dist-info/METADATA,sha256=v_j-7cwuj3shcuJONNPKemWmfT-DlRYlpOg1Ij7Jhr8,11033
|
49
|
+
lmnr-0.4.16.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
50
|
+
lmnr-0.4.16.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
|
51
|
+
lmnr-0.4.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|