lmnr 0.5.1a0__py3-none-any.whl → 0.5.2__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.
Files changed (33) hide show
  1. lmnr/__init__.py +0 -8
  2. lmnr/openllmetry_sdk/__init__.py +5 -33
  3. lmnr/openllmetry_sdk/decorators/base.py +24 -17
  4. lmnr/openllmetry_sdk/instruments.py +1 -0
  5. lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/__init__.py +454 -0
  6. lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/config.py +9 -0
  7. lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/utils.py +216 -0
  8. lmnr/openllmetry_sdk/tracing/__init__.py +1 -0
  9. lmnr/openllmetry_sdk/tracing/context_manager.py +13 -0
  10. lmnr/openllmetry_sdk/tracing/tracing.py +230 -252
  11. lmnr/sdk/browser/playwright_otel.py +42 -58
  12. lmnr/sdk/browser/pw_utils.py +8 -40
  13. lmnr/sdk/client/asynchronous/async_client.py +0 -34
  14. lmnr/sdk/client/asynchronous/resources/__init__.py +0 -4
  15. lmnr/sdk/client/asynchronous/resources/agent.py +96 -6
  16. lmnr/sdk/client/synchronous/resources/__init__.py +1 -3
  17. lmnr/sdk/client/synchronous/resources/agent.py +94 -8
  18. lmnr/sdk/client/synchronous/sync_client.py +0 -36
  19. lmnr/sdk/decorators.py +16 -2
  20. lmnr/sdk/laminar.py +3 -3
  21. lmnr/sdk/types.py +84 -170
  22. lmnr/sdk/utils.py +8 -1
  23. lmnr/version.py +1 -1
  24. {lmnr-0.5.1a0.dist-info → lmnr-0.5.2.dist-info}/METADATA +57 -57
  25. lmnr-0.5.2.dist-info/RECORD +54 -0
  26. lmnr/sdk/client/asynchronous/resources/pipeline.py +0 -89
  27. lmnr/sdk/client/asynchronous/resources/semantic_search.py +0 -60
  28. lmnr/sdk/client/synchronous/resources/pipeline.py +0 -89
  29. lmnr/sdk/client/synchronous/resources/semantic_search.py +0 -60
  30. lmnr-0.5.1a0.dist-info/RECORD +0 -54
  31. {lmnr-0.5.1a0.dist-info → lmnr-0.5.2.dist-info}/LICENSE +0 -0
  32. {lmnr-0.5.1a0.dist-info → lmnr-0.5.2.dist-info}/WHEEL +0 -0
  33. {lmnr-0.5.1a0.dist-info → lmnr-0.5.2.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lmnr
3
- Version: 0.5.1a0
3
+ Version: 0.5.2
4
4
  Summary: Python SDK for Laminar
5
5
  License: Apache-2.0
6
6
  Author: lmnr.ai
@@ -41,67 +41,67 @@ Provides-Extra: watsonx
41
41
  Provides-Extra: weaviate
42
42
  Requires-Dist: argparse (>=1.0)
43
43
  Requires-Dist: grpcio (<1.68.0)
44
- Requires-Dist: httpx (>=0.28.1)
44
+ Requires-Dist: httpx (>=0.25.0)
45
45
  Requires-Dist: opentelemetry-api (>=1.31.1)
46
46
  Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.31.1)
47
47
  Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.31.1)
48
- Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.38.12) ; extra == "alephalpha"
49
- Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.38.12) ; extra == "all"
50
- Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.38.12) ; extra == "all"
51
- Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.38.12) ; extra == "anthropic"
52
- Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.38.12) ; extra == "all"
53
- Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.38.12) ; extra == "bedrock"
54
- Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.38.12) ; extra == "all"
55
- Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.38.12) ; extra == "chromadb"
56
- Requires-Dist: opentelemetry-instrumentation-cohere (>=0.38.12) ; extra == "all"
57
- Requires-Dist: opentelemetry-instrumentation-cohere (>=0.38.12) ; extra == "cohere"
58
- Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.38.12) ; extra == "all"
59
- Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.38.12) ; extra == "google-generativeai"
60
- Requires-Dist: opentelemetry-instrumentation-groq (>=0.38.12) ; extra == "all"
61
- Requires-Dist: opentelemetry-instrumentation-groq (>=0.38.12) ; extra == "groq"
62
- Requires-Dist: opentelemetry-instrumentation-haystack (>=0.38.12) ; extra == "all"
63
- Requires-Dist: opentelemetry-instrumentation-haystack (>=0.38.12) ; extra == "haystack"
64
- Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.38.12) ; extra == "all"
65
- Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.38.12) ; extra == "lancedb"
66
- Requires-Dist: opentelemetry-instrumentation-langchain (>=0.38.12) ; extra == "all"
67
- Requires-Dist: opentelemetry-instrumentation-langchain (>=0.38.12) ; extra == "langchain"
68
- Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.38.12) ; extra == "all"
69
- Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.38.12) ; extra == "llamaindex"
70
- Requires-Dist: opentelemetry-instrumentation-marqo (>=0.38.12) ; extra == "all"
71
- Requires-Dist: opentelemetry-instrumentation-marqo (>=0.38.12) ; extra == "marqo"
72
- Requires-Dist: opentelemetry-instrumentation-milvus (>=0.38.12) ; extra == "all"
73
- Requires-Dist: opentelemetry-instrumentation-milvus (>=0.38.12) ; extra == "milvus"
74
- Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.38.12) ; extra == "all"
75
- Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.38.12) ; extra == "mistralai"
76
- Requires-Dist: opentelemetry-instrumentation-ollama (>=0.38.12) ; extra == "all"
77
- Requires-Dist: opentelemetry-instrumentation-ollama (>=0.38.12) ; extra == "ollama"
78
- Requires-Dist: opentelemetry-instrumentation-openai (>=0.38.12) ; extra == "all"
79
- Requires-Dist: opentelemetry-instrumentation-openai (>=0.38.12) ; extra == "openai"
80
- Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.38.12) ; extra == "all"
81
- Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.38.12) ; extra == "pinecone"
82
- Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.38.12) ; extra == "all"
83
- Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.38.12) ; extra == "qdrant"
84
- Requires-Dist: opentelemetry-instrumentation-replicate (>=0.38.12) ; extra == "all"
85
- Requires-Dist: opentelemetry-instrumentation-replicate (>=0.38.12) ; extra == "replicate"
48
+ Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.39.2) ; extra == "alephalpha"
49
+ Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.39.2) ; extra == "all"
50
+ Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.39.2) ; extra == "all"
51
+ Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.39.2) ; extra == "anthropic"
52
+ Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.39.2) ; extra == "all"
53
+ Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.39.2) ; extra == "bedrock"
54
+ Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.39.2) ; extra == "all"
55
+ Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.39.2) ; extra == "chromadb"
56
+ Requires-Dist: opentelemetry-instrumentation-cohere (>=0.39.2) ; extra == "all"
57
+ Requires-Dist: opentelemetry-instrumentation-cohere (>=0.39.2) ; extra == "cohere"
58
+ Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.39.2) ; extra == "all"
59
+ Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.39.2) ; extra == "google-generativeai"
60
+ Requires-Dist: opentelemetry-instrumentation-groq (>=0.39.2) ; extra == "all"
61
+ Requires-Dist: opentelemetry-instrumentation-groq (>=0.39.2) ; extra == "groq"
62
+ Requires-Dist: opentelemetry-instrumentation-haystack (>=0.39.2) ; extra == "all"
63
+ Requires-Dist: opentelemetry-instrumentation-haystack (>=0.39.2) ; extra == "haystack"
64
+ Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.39.2) ; extra == "all"
65
+ Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.39.2) ; extra == "lancedb"
66
+ Requires-Dist: opentelemetry-instrumentation-langchain (>=0.39.2) ; extra == "all"
67
+ Requires-Dist: opentelemetry-instrumentation-langchain (>=0.39.2) ; extra == "langchain"
68
+ Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.39.2) ; extra == "all"
69
+ Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.39.2) ; extra == "llamaindex"
70
+ Requires-Dist: opentelemetry-instrumentation-marqo (>=0.39.2) ; extra == "all"
71
+ Requires-Dist: opentelemetry-instrumentation-marqo (>=0.39.2) ; extra == "marqo"
72
+ Requires-Dist: opentelemetry-instrumentation-milvus (>=0.39.2) ; extra == "all"
73
+ Requires-Dist: opentelemetry-instrumentation-milvus (>=0.39.2) ; extra == "milvus"
74
+ Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.39.2) ; extra == "all"
75
+ Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.39.2) ; extra == "mistralai"
76
+ Requires-Dist: opentelemetry-instrumentation-ollama (>=0.39.2) ; extra == "all"
77
+ Requires-Dist: opentelemetry-instrumentation-ollama (>=0.39.2) ; extra == "ollama"
78
+ Requires-Dist: opentelemetry-instrumentation-openai (>=0.39.2) ; extra == "all"
79
+ Requires-Dist: opentelemetry-instrumentation-openai (>=0.39.2) ; extra == "openai"
80
+ Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.39.2) ; extra == "all"
81
+ Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.39.2) ; extra == "pinecone"
82
+ Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.39.2) ; extra == "all"
83
+ Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.39.2) ; extra == "qdrant"
84
+ Requires-Dist: opentelemetry-instrumentation-replicate (>=0.39.2) ; extra == "all"
85
+ Requires-Dist: opentelemetry-instrumentation-replicate (>=0.39.2) ; extra == "replicate"
86
86
  Requires-Dist: opentelemetry-instrumentation-requests (>=0.52b0)
87
- Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.38.12) ; extra == "all"
88
- Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.38.12) ; extra == "sagemaker"
87
+ Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.39.2) ; extra == "all"
88
+ Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.39.2) ; extra == "sagemaker"
89
89
  Requires-Dist: opentelemetry-instrumentation-sqlalchemy (>=0.52b0)
90
90
  Requires-Dist: opentelemetry-instrumentation-threading (>=0.52b0)
91
- Requires-Dist: opentelemetry-instrumentation-together (>=0.38.12) ; extra == "all"
92
- Requires-Dist: opentelemetry-instrumentation-together (>=0.38.12) ; extra == "together"
93
- Requires-Dist: opentelemetry-instrumentation-transformers (>=0.38.12) ; extra == "all"
94
- Requires-Dist: opentelemetry-instrumentation-transformers (>=0.38.12) ; extra == "transformers"
91
+ Requires-Dist: opentelemetry-instrumentation-together (>=0.39.2) ; extra == "all"
92
+ Requires-Dist: opentelemetry-instrumentation-together (>=0.39.2) ; extra == "together"
93
+ Requires-Dist: opentelemetry-instrumentation-transformers (>=0.39.2) ; extra == "all"
94
+ Requires-Dist: opentelemetry-instrumentation-transformers (>=0.39.2) ; extra == "transformers"
95
95
  Requires-Dist: opentelemetry-instrumentation-urllib3 (>=0.52b0)
96
- Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.38.12) ; extra == "all"
97
- Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.38.12) ; extra == "vertexai"
98
- Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.38.12) ; extra == "all"
99
- Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.38.12) ; extra == "watsonx"
100
- Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.38.12) ; extra == "all"
101
- Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.38.12) ; extra == "weaviate"
96
+ Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.39.2) ; extra == "all"
97
+ Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.39.2) ; extra == "vertexai"
98
+ Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.39.2) ; extra == "all"
99
+ Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.39.2) ; extra == "watsonx"
100
+ Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.39.2) ; extra == "all"
101
+ Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.39.2) ; extra == "weaviate"
102
102
  Requires-Dist: opentelemetry-sdk (>=1.31.1)
103
103
  Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.4.2)
104
- Requires-Dist: pydantic (>=2.0.3)
104
+ Requires-Dist: pydantic (>=2.0.3,<3.0.0)
105
105
  Requires-Dist: python-dotenv (>=1.0)
106
106
  Requires-Dist: tenacity (>=8.0)
107
107
  Requires-Dist: tqdm (>=4.0)
@@ -335,9 +335,9 @@ for chunk in client.agent.run(
335
335
  prompt="What is the weather in London today?",
336
336
  stream=True
337
337
  ):
338
- if chunk.chunkType == 'step':
338
+ if chunk.chunk_type == 'step':
339
339
  print(chunk.summary)
340
- elif chunk.chunkType == 'finalOutput':
340
+ elif chunk.chunk_type == 'finalOutput':
341
341
  print(chunk.content.result.content)
342
342
  ```
343
343
 
@@ -371,9 +371,9 @@ async for chunk in client.agent.run(
371
371
  prompt="What is the weather in London today?",
372
372
  stream=True
373
373
  ):
374
- if chunk.chunkType == 'step':
374
+ if chunk.chunk_type == 'step':
375
375
  print(chunk.summary)
376
- elif chunk.chunkType == 'finalOutput':
376
+ elif chunk.chunk_type == 'finalOutput':
377
377
  print(chunk.content.result.content)
378
378
  ```
379
379
 
@@ -0,0 +1,54 @@
1
+ lmnr/__init__.py,sha256=A5vw1Unj-cv0Vt8_bwy2JTF00MlH7kJQ2UQqpQCiw3o,1020
2
+ lmnr/cli.py,sha256=4J2RZQhHM3jJcjFvBC4PChQTS-ukxykVvI0X6lTkK-o,2918
3
+ lmnr/openllmetry_sdk/.flake8,sha256=bCxuDlGx3YQ55QHKPiGJkncHanh9qGjQJUujcFa3lAU,150
4
+ lmnr/openllmetry_sdk/__init__.py,sha256=LCj9R-DabASoYbmaiP7m6er2z3rAYgHqQGuDp2apXws,2532
5
+ lmnr/openllmetry_sdk/config/__init__.py,sha256=5aGdIdo1LffBkNwIBUbqzN6OUCMCrURU4b0rf5LBSI0,300
6
+ lmnr/openllmetry_sdk/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ lmnr/openllmetry_sdk/decorators/base.py,sha256=kzCiUnOT3L8Apt6QfeoVN-d1IGlooKozHINCLlpcLac,7430
8
+ lmnr/openllmetry_sdk/instruments.py,sha256=f0kI40LjAEMbRHju9ywUPe_0z7V51QRLV3lFmjnSGIA,1132
9
+ lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/__init__.py,sha256=jrvHu8aq2EBGZI3ypucUltR4-v8HqTKnqGtWXF5Qbb8,15339
10
+ lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/config.py,sha256=FeQOcC3RNq-yOd8KZ_VoBuZgDl6tnkxx6I2MKVH1GMI,256
11
+ lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/utils.py,sha256=aEimUHNRdfb6zzp5X-9QxhIPum0EYxkJIYNZxAykomA,6233
12
+ lmnr/openllmetry_sdk/tracing/__init__.py,sha256=xT73L1t2si2CM6QmMiTZ7zn-dKKYBLNrpBBWq6WfVBw,68
13
+ lmnr/openllmetry_sdk/tracing/attributes.py,sha256=BEMMGrX_7kPu4PNCV7Bz1uaclY4DNhlaLT0bWwFQnRE,1366
14
+ lmnr/openllmetry_sdk/tracing/content_allow_list.py,sha256=3feztm6PBWNelc8pAZUcQyEGyeSpNiVKjOaDk65l2ps,846
15
+ lmnr/openllmetry_sdk/tracing/context_manager.py,sha256=rdSus-p-TaevQ8hIAhfbnZr5dTqRvACDkzXGDpflncY,306
16
+ lmnr/openllmetry_sdk/tracing/tracing.py,sha256=5-ufoKN7QlspaLa1U0uOtbbPf54XVUp_ZnjnBrUxUgw,36826
17
+ lmnr/openllmetry_sdk/utils/__init__.py,sha256=pNhf0G3vTd5ccoc03i1MXDbricSaiqCbi1DLWhSekK8,604
18
+ lmnr/openllmetry_sdk/utils/in_memory_span_exporter.py,sha256=H_4TRaThMO1H6vUQ0OpQvzJk_fZH0OOsRAM1iZQXsR8,2112
19
+ lmnr/openllmetry_sdk/utils/json_encoder.py,sha256=dK6b_axr70IYL7Vv-bu4wntvDDuyntoqsHaddqX7P58,463
20
+ lmnr/openllmetry_sdk/utils/package_check.py,sha256=_-Fu9Zbp9tOyy27_-Rul7tDc8JaXYR2FmqF8SWOXSCc,244
21
+ lmnr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ lmnr/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ lmnr/sdk/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ lmnr/sdk/browser/browser_use_otel.py,sha256=wKFe07XTUUCuPDwFD9gqGrcaaj82BRg-kLLZQM_KshM,3915
25
+ lmnr/sdk/browser/playwright_otel.py,sha256=kvGk7qXbbWjnawrlhQ8lTD72h95Tp_VpdFFp9dkfADY,12478
26
+ lmnr/sdk/browser/pw_utils.py,sha256=YVIdIsQnnV2DwO-7oVUdm0hBFSozxaTaW7vOuZ2M_mQ,9335
27
+ lmnr/sdk/browser/rrweb/rrweb.min.js,sha256=X5pgaoX1j_OjKTqGQgKB-83xUSuydNLQa-Kkh1AAZYM,140485
28
+ lmnr/sdk/browser/utils.py,sha256=xPpMRP2y9aJIsdIDNg2wN4PSa_4w0LSsra-GIMx9VXc,2366
29
+ lmnr/sdk/client/asynchronous/async_client.py,sha256=NuGla1gGlyYLxyIQ6LSKG-b5eYGNIQA5HXAOzGQR5BU,4036
30
+ lmnr/sdk/client/asynchronous/resources/__init__.py,sha256=WL2ehX1LfxG3n7bsxzTRO8grM0YtMGb_r7DLMjkmm1Y,298
31
+ lmnr/sdk/client/asynchronous/resources/agent.py,sha256=AmPBh_c0KFT6oxLszfwYvSvR-9evUesebeKH4K_npLw,16404
32
+ lmnr/sdk/client/asynchronous/resources/base.py,sha256=aJ43Q1rltg23IQaI4eeaZKckxVTgDUbCJrChhQCUEoE,986
33
+ lmnr/sdk/client/asynchronous/resources/browser_events.py,sha256=T-DUbbAfMQ2VqiVfgVplxuTaJZuoNcC1O6RCxdfw7UQ,1163
34
+ lmnr/sdk/client/asynchronous/resources/evals.py,sha256=bm3ATwqLozUoW2Ed6psmdjmeJ7joBaQHSv6mBeA_cws,2187
35
+ lmnr/sdk/client/synchronous/resources/__init__.py,sha256=Sk0_5Y1UkqwUhJKRct9R3JAnHk6sPe8lDokpYVqehdY,250
36
+ lmnr/sdk/client/synchronous/resources/agent.py,sha256=LPqCVW2tyyc5a3TtUatMYymYmZn_LUbhuujc3AMgt_0,16283
37
+ lmnr/sdk/client/synchronous/resources/base.py,sha256=ne1ZZ10UmNkMrECVvClcEJfcFJlSGvaXOC8K6mZTPdY,971
38
+ lmnr/sdk/client/synchronous/resources/browser_events.py,sha256=9rFYWZesXQomnFgbZ590tGFMTaNj0OAzT9RcFwD8q_Y,1135
39
+ lmnr/sdk/client/synchronous/resources/evals.py,sha256=sMMAai7_IW842z_J0W9OpthDhGQPCkTVJZamIkKq0wk,3496
40
+ lmnr/sdk/client/synchronous/sync_client.py,sha256=-sSMbUvgDLt98tT-nDyE_xfTohcGdn00lAmul1713Wo,4396
41
+ lmnr/sdk/datasets.py,sha256=jl5Wj5nEI9pww4Jwn4XKF8h0gXBU4TOIrhqNjTJsHZQ,1709
42
+ lmnr/sdk/decorators.py,sha256=ivpkFJLvjaGYButytHkSMIjJRls_E4iqCVPm6K7mvc8,3325
43
+ lmnr/sdk/eval_control.py,sha256=G6Fg3Xx_KWv72iBaWlNMdyRTF2bZFQnwJ68sJNSpIcY,177
44
+ lmnr/sdk/evaluations.py,sha256=kjzc257BKhq3z_vMeHD96pJ_xBoiWzW8e0lkVaNJ2jY,20555
45
+ lmnr/sdk/laminar.py,sha256=f9g9HFS30-jukKbfSAerQ6L5hvplC2H6kNIL-U9bSPw,27980
46
+ lmnr/sdk/log.py,sha256=nt_YMmPw1IRbGy0b7q4rTtP4Yo3pQfNxqJPXK3nDSNQ,2213
47
+ lmnr/sdk/types.py,sha256=A507aIjcrE8uHK7oDvgyDc6uhiFrr-DWsk8ckM7X09c,12163
48
+ lmnr/sdk/utils.py,sha256=_8t_KGnSJUIOfwAsNDEcI3YP2PuQdht2Pg2Rq7yaI08,3912
49
+ lmnr/version.py,sha256=bnpX-cHtmifQCI-zrXheJx6-CVArECw92ZIyBIYBbhU,1321
50
+ lmnr-0.5.2.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
51
+ lmnr-0.5.2.dist-info/METADATA,sha256=cAeKb1a2OxIi_N6Wey-GI92IXo41UdthpM_8TWdT0No,14957
52
+ lmnr-0.5.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
53
+ lmnr-0.5.2.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
54
+ lmnr-0.5.2.dist-info/RECORD,,
@@ -1,89 +0,0 @@
1
- """Pipeline resource for running Laminar pipelines."""
2
-
3
- import uuid
4
- from typing import Optional
5
- from opentelemetry import trace
6
-
7
- from lmnr.sdk.client.asynchronous.resources.base import BaseAsyncResource
8
- from lmnr.sdk.types import (
9
- NodeInput,
10
- PipelineRunError,
11
- PipelineRunRequest,
12
- PipelineRunResponse,
13
- )
14
-
15
-
16
- class AsyncPipeline(BaseAsyncResource):
17
- """Resource for interacting with Laminar pipelines."""
18
-
19
- async def run(
20
- self,
21
- pipeline: str,
22
- inputs: dict[str, NodeInput],
23
- env: dict[str, str] = {},
24
- metadata: dict[str, str] = {},
25
- parent_span_id: Optional[uuid.UUID] = None,
26
- trace_id: Optional[uuid.UUID] = None,
27
- ) -> PipelineRunResponse:
28
- """Run a pipeline with the given inputs and environment variables.
29
-
30
- Args:
31
- pipeline (str): pipeline name
32
- inputs (dict[str, NodeInput]): input values for the pipeline
33
- env (dict[str, str], optional): environment variables for the pipeline
34
- metadata (dict[str, str], optional): metadata for the pipeline run
35
- parent_span_id (Optional[uuid.UUID], optional): parent span id for the pipeline
36
- trace_id (Optional[uuid.UUID], optional): trace id for the pipeline
37
-
38
- Raises:
39
- ValueError: if the project API key is not set
40
- PipelineRunError: if the pipeline run fails
41
-
42
- Returns:
43
- PipelineRunResponse: response from the pipeline run
44
- """
45
- if self._project_api_key is None:
46
- raise ValueError(
47
- "Please initialize the Laminar object with your project "
48
- "API key or set the LMNR_PROJECT_API_KEY environment variable"
49
- )
50
-
51
- current_span = trace.get_current_span()
52
- if current_span != trace.INVALID_SPAN:
53
- parent_span_id = parent_span_id or uuid.UUID(
54
- int=current_span.get_span_context().span_id
55
- )
56
- trace_id = trace_id or uuid.UUID(
57
- int=current_span.get_span_context().trace_id
58
- )
59
-
60
- request = PipelineRunRequest(
61
- inputs=inputs,
62
- pipeline=pipeline,
63
- env=env or {},
64
- metadata=metadata,
65
- parent_span_id=parent_span_id,
66
- trace_id=trace_id,
67
- )
68
-
69
- response = await self._client.post(
70
- self._base_url + "/v1/pipeline/run",
71
- json=request.to_dict(),
72
- headers=self._headers(),
73
- )
74
-
75
- if response.status_code != 200:
76
- raise PipelineRunError(response)
77
-
78
- try:
79
- from pydantic.alias_generators import to_snake
80
-
81
- resp_json = response.json()
82
- keys = list(resp_json.keys())
83
- for key in keys:
84
- value = resp_json[key]
85
- del resp_json[key]
86
- resp_json[to_snake(key)] = value
87
- return PipelineRunResponse(**resp_json)
88
- except Exception:
89
- raise PipelineRunError(response)
@@ -1,60 +0,0 @@
1
- """SemanticSearch resource for interacting with Laminar semantic search API."""
2
-
3
- import uuid
4
- from typing import Optional
5
-
6
- from lmnr.sdk.client.asynchronous.resources.base import BaseAsyncResource
7
- from lmnr.sdk.types import (
8
- SemanticSearchRequest,
9
- SemanticSearchResponse,
10
- )
11
-
12
-
13
- class AsyncSemanticSearch(BaseAsyncResource):
14
- """Resource for interacting with Laminar semantic search API."""
15
-
16
- async def search(
17
- self,
18
- query: str,
19
- dataset_id: uuid.UUID,
20
- limit: Optional[int] = None,
21
- threshold: Optional[float] = None,
22
- ) -> SemanticSearchResponse:
23
- """Perform a semantic search on the given dataset.
24
-
25
- Args:
26
- query (str): query to search for
27
- dataset_id (uuid.UUID): dataset ID created in the UI
28
- limit (Optional[int], optional): maximum number of results to return
29
- threshold (Optional[float], optional): lowest similarity score to return
30
-
31
- Raises:
32
- ValueError: if an error happens while performing the semantic search
33
-
34
- Returns:
35
- SemanticSearchResponse: response from the semantic search
36
- """
37
- request = SemanticSearchRequest(
38
- query=query,
39
- dataset_id=dataset_id,
40
- limit=limit,
41
- threshold=threshold,
42
- )
43
- response = await self._client.post(
44
- self._base_url + "/v1/semantic-search",
45
- json=request.to_dict(),
46
- headers=self._headers(),
47
- )
48
- if response.status_code != 200:
49
- raise ValueError(
50
- f"Error performing semantic search: [{response.status_code}] {response.text}"
51
- )
52
- try:
53
- resp_json = response.json()
54
- for result in resp_json["results"]:
55
- result["dataset_id"] = uuid.UUID(result["datasetId"])
56
- return SemanticSearchResponse(**resp_json)
57
- except Exception as e:
58
- raise ValueError(
59
- f"Error parsing semantic search response: status={response.status_code} error={e}"
60
- )
@@ -1,89 +0,0 @@
1
- """Pipeline resource for running Laminar pipelines."""
2
-
3
- import uuid
4
- from typing import Optional
5
- from opentelemetry import trace
6
-
7
- from lmnr.sdk.client.synchronous.resources.base import BaseResource
8
- from lmnr.sdk.types import (
9
- NodeInput,
10
- PipelineRunError,
11
- PipelineRunRequest,
12
- PipelineRunResponse,
13
- )
14
-
15
-
16
- class Pipeline(BaseResource):
17
- """Resource for interacting with Laminar pipelines."""
18
-
19
- def run(
20
- self,
21
- pipeline: str,
22
- inputs: dict[str, NodeInput],
23
- env: dict[str, str] = {},
24
- metadata: dict[str, str] = {},
25
- parent_span_id: Optional[uuid.UUID] = None,
26
- trace_id: Optional[uuid.UUID] = None,
27
- ) -> PipelineRunResponse:
28
- """Run a pipeline with the given inputs and environment variables.
29
-
30
- Args:
31
- pipeline (str): pipeline name
32
- inputs (dict[str, NodeInput]): input values for the pipeline
33
- env (dict[str, str], optional): environment variables for the pipeline
34
- metadata (dict[str, str], optional): metadata for the pipeline run
35
- parent_span_id (Optional[uuid.UUID], optional): parent span id for the pipeline
36
- trace_id (Optional[uuid.UUID], optional): trace id for the pipeline
37
-
38
- Raises:
39
- ValueError: if the project API key is not set
40
- PipelineRunError: if the pipeline run fails
41
-
42
- Returns:
43
- PipelineRunResponse: response from the pipeline run
44
- """
45
- if self._project_api_key is None:
46
- raise ValueError(
47
- "Please initialize the Laminar object with your project "
48
- "API key or set the LMNR_PROJECT_API_KEY environment variable"
49
- )
50
-
51
- current_span = trace.get_current_span()
52
- if current_span != trace.INVALID_SPAN:
53
- parent_span_id = parent_span_id or uuid.UUID(
54
- int=current_span.get_span_context().span_id
55
- )
56
- trace_id = trace_id or uuid.UUID(
57
- int=current_span.get_span_context().trace_id
58
- )
59
-
60
- request = PipelineRunRequest(
61
- inputs=inputs,
62
- pipeline=pipeline,
63
- env=env or {},
64
- metadata=metadata,
65
- parent_span_id=parent_span_id,
66
- trace_id=trace_id,
67
- )
68
-
69
- response = self._client.post(
70
- self._base_url + "/v1/pipeline/run",
71
- json=request.to_dict(),
72
- headers=self._headers(),
73
- )
74
-
75
- if response.status_code != 200:
76
- raise PipelineRunError(response)
77
-
78
- try:
79
- from pydantic.alias_generators import to_snake
80
-
81
- resp_json = response.json()
82
- keys = list(resp_json.keys())
83
- for key in keys:
84
- value = resp_json[key]
85
- del resp_json[key]
86
- resp_json[to_snake(key)] = value
87
- return PipelineRunResponse(**resp_json)
88
- except Exception:
89
- raise PipelineRunError(response)
@@ -1,60 +0,0 @@
1
- """SemanticSearch resource for interacting with Laminar semantic search API."""
2
-
3
- import uuid
4
- from typing import Optional
5
-
6
- from lmnr.sdk.client.synchronous.resources.base import BaseResource
7
- from lmnr.sdk.types import (
8
- SemanticSearchRequest,
9
- SemanticSearchResponse,
10
- )
11
-
12
-
13
- class SemanticSearch(BaseResource):
14
- """Resource for interacting with Laminar semantic search API."""
15
-
16
- def search(
17
- self,
18
- query: str,
19
- dataset_id: uuid.UUID,
20
- limit: Optional[int] = None,
21
- threshold: Optional[float] = None,
22
- ) -> SemanticSearchResponse:
23
- """Perform a semantic search on the given dataset.
24
-
25
- Args:
26
- query (str): query to search for
27
- dataset_id (uuid.UUID): dataset ID created in the UI
28
- limit (Optional[int], optional): maximum number of results to return
29
- threshold (Optional[float], optional): lowest similarity score to return
30
-
31
- Raises:
32
- ValueError: if an error happens while performing the semantic search
33
-
34
- Returns:
35
- SemanticSearchResponse: response from the semantic search
36
- """
37
- request = SemanticSearchRequest(
38
- query=query,
39
- dataset_id=dataset_id,
40
- limit=limit,
41
- threshold=threshold,
42
- )
43
- response = self._client.post(
44
- self._base_url + "/v1/semantic-search",
45
- json=request.to_dict(),
46
- headers=self._headers(),
47
- )
48
- if response.status_code != 200:
49
- raise ValueError(
50
- f"Error performing semantic search: [{response.status_code}] {response.text}"
51
- )
52
- try:
53
- resp_json = response.json()
54
- for result in resp_json["results"]:
55
- result["dataset_id"] = uuid.UUID(result["datasetId"])
56
- return SemanticSearchResponse(**resp_json)
57
- except Exception as e:
58
- raise ValueError(
59
- f"Error parsing semantic search response: status={response.status_code} error={e}"
60
- )
@@ -1,54 +0,0 @@
1
- lmnr/__init__.py,sha256=q_LvkFcUKZCxrCap4Mr4cewyNg1vh-t2tX-kaOUdWos,1186
2
- lmnr/cli.py,sha256=4J2RZQhHM3jJcjFvBC4PChQTS-ukxykVvI0X6lTkK-o,2918
3
- lmnr/openllmetry_sdk/.flake8,sha256=bCxuDlGx3YQ55QHKPiGJkncHanh9qGjQJUujcFa3lAU,150
4
- lmnr/openllmetry_sdk/__init__.py,sha256=3zDqa-NEDEwdaxYv9Lcg39IpOnl-CWhGvU3fP17GwTk,3325
5
- lmnr/openllmetry_sdk/config/__init__.py,sha256=5aGdIdo1LffBkNwIBUbqzN6OUCMCrURU4b0rf5LBSI0,300
6
- lmnr/openllmetry_sdk/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- lmnr/openllmetry_sdk/decorators/base.py,sha256=Wrr6r7nsPyNl8fE1w7BcTLeaE965kON8LvwOcwMfTRI,7100
8
- lmnr/openllmetry_sdk/instruments.py,sha256=9KoJ19Qar1dBrmO1wikNEkKxRfus8znQTj-g_maRTTM,1098
9
- lmnr/openllmetry_sdk/tracing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- lmnr/openllmetry_sdk/tracing/attributes.py,sha256=BEMMGrX_7kPu4PNCV7Bz1uaclY4DNhlaLT0bWwFQnRE,1366
11
- lmnr/openllmetry_sdk/tracing/content_allow_list.py,sha256=3feztm6PBWNelc8pAZUcQyEGyeSpNiVKjOaDk65l2ps,846
12
- lmnr/openllmetry_sdk/tracing/tracing.py,sha256=eX2Fwmu6iiRxOSjH3KyCjmZNH3rVXhlbYef1vauJijc,38839
13
- lmnr/openllmetry_sdk/utils/__init__.py,sha256=pNhf0G3vTd5ccoc03i1MXDbricSaiqCbi1DLWhSekK8,604
14
- lmnr/openllmetry_sdk/utils/in_memory_span_exporter.py,sha256=H_4TRaThMO1H6vUQ0OpQvzJk_fZH0OOsRAM1iZQXsR8,2112
15
- lmnr/openllmetry_sdk/utils/json_encoder.py,sha256=dK6b_axr70IYL7Vv-bu4wntvDDuyntoqsHaddqX7P58,463
16
- lmnr/openllmetry_sdk/utils/package_check.py,sha256=_-Fu9Zbp9tOyy27_-Rul7tDc8JaXYR2FmqF8SWOXSCc,244
17
- lmnr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- lmnr/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- lmnr/sdk/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- lmnr/sdk/browser/browser_use_otel.py,sha256=wKFe07XTUUCuPDwFD9gqGrcaaj82BRg-kLLZQM_KshM,3915
21
- lmnr/sdk/browser/playwright_otel.py,sha256=en91IZxuHFgFHbmssbdJZejtBIlma7gJ9NCv3_RLXzk,12636
22
- lmnr/sdk/browser/pw_utils.py,sha256=Lh0pJ3sb_NC8roZnQppBtK8VV-AHXchPUxISEm5SkF4,10490
23
- lmnr/sdk/browser/rrweb/rrweb.min.js,sha256=X5pgaoX1j_OjKTqGQgKB-83xUSuydNLQa-Kkh1AAZYM,140485
24
- lmnr/sdk/browser/utils.py,sha256=xPpMRP2y9aJIsdIDNg2wN4PSa_4w0LSsra-GIMx9VXc,2366
25
- lmnr/sdk/client/asynchronous/async_client.py,sha256=9QqeYIsHPCS23kAUhwTqBmSxGKJ6j_M0AUicOI3KoM8,4953
26
- lmnr/sdk/client/asynchronous/resources/__init__.py,sha256=ul1K_uvLmN5pw1Z_NZojdZ_CDp7om4RYV78pkgx6-2M,507
27
- lmnr/sdk/client/asynchronous/resources/agent.py,sha256=95m72mNL1ScCkaoHg204h7evNbgtm1hkoHf9Pe6f0X4,8940
28
- lmnr/sdk/client/asynchronous/resources/base.py,sha256=aJ43Q1rltg23IQaI4eeaZKckxVTgDUbCJrChhQCUEoE,986
29
- lmnr/sdk/client/asynchronous/resources/browser_events.py,sha256=T-DUbbAfMQ2VqiVfgVplxuTaJZuoNcC1O6RCxdfw7UQ,1163
30
- lmnr/sdk/client/asynchronous/resources/evals.py,sha256=bm3ATwqLozUoW2Ed6psmdjmeJ7joBaQHSv6mBeA_cws,2187
31
- lmnr/sdk/client/asynchronous/resources/pipeline.py,sha256=Tdb-ChxBcjDvOLuPQA6V-Gksf-3dJpHfbrGToa2qVmk,3002
32
- lmnr/sdk/client/asynchronous/resources/semantic_search.py,sha256=YEshW6sIlkAi29yEKkp7b95V9aK0sj5zwaU6sWgeB-M,2074
33
- lmnr/sdk/client/synchronous/resources/__init__.py,sha256=T9gI_QhvdBYbIEzfa_Z8QEtzunqgNGOsSJ9KVvR5cL0,429
34
- lmnr/sdk/client/synchronous/resources/agent.py,sha256=dRXkMO6AMZFh5yz8q0TdszG4oTHmOUg1CYNzfEq8zss,8829
35
- lmnr/sdk/client/synchronous/resources/base.py,sha256=ne1ZZ10UmNkMrECVvClcEJfcFJlSGvaXOC8K6mZTPdY,971
36
- lmnr/sdk/client/synchronous/resources/browser_events.py,sha256=9rFYWZesXQomnFgbZ590tGFMTaNj0OAzT9RcFwD8q_Y,1135
37
- lmnr/sdk/client/synchronous/resources/evals.py,sha256=sMMAai7_IW842z_J0W9OpthDhGQPCkTVJZamIkKq0wk,3496
38
- lmnr/sdk/client/synchronous/resources/pipeline.py,sha256=MJLF7HICjB7kS1-DvtJPAneIO1aMRl8fGG1QZjCsPl4,2974
39
- lmnr/sdk/client/synchronous/resources/semantic_search.py,sha256=oFH5r3bWJEvoZrC_a4jAtZko9tdpuUzCX1M0yvj8MMw,2046
40
- lmnr/sdk/client/synchronous/sync_client.py,sha256=jLX-hZMwm6m9urajg1HrpDuaRdNs9_M11DnJ6-HV3EY,5380
41
- lmnr/sdk/datasets.py,sha256=jl5Wj5nEI9pww4Jwn4XKF8h0gXBU4TOIrhqNjTJsHZQ,1709
42
- lmnr/sdk/decorators.py,sha256=g0VBqUEMCPRbgjgGHauVuKK1wHEd9rkiGzlYUYrcml4,2336
43
- lmnr/sdk/eval_control.py,sha256=G6Fg3Xx_KWv72iBaWlNMdyRTF2bZFQnwJ68sJNSpIcY,177
44
- lmnr/sdk/evaluations.py,sha256=kjzc257BKhq3z_vMeHD96pJ_xBoiWzW8e0lkVaNJ2jY,20555
45
- lmnr/sdk/laminar.py,sha256=0FRgGT7SWw4mwGY525EXUHAf_Qj5swaeg3RewUYPyAA,27976
46
- lmnr/sdk/log.py,sha256=nt_YMmPw1IRbGy0b7q4rTtP4Yo3pQfNxqJPXK3nDSNQ,2213
47
- lmnr/sdk/types.py,sha256=wtSiq7KqdvQ5k7URdDnGoWwX3ucDNMabNfVnbKBXfhs,13940
48
- lmnr/sdk/utils.py,sha256=o9MybEMM0Tp_xxCMFpzEYDsOAn2I7g1t7MrazOQAxAs,3692
49
- lmnr/version.py,sha256=in8hiGDV28kmF2xSVRf1DEvu8z9A1snM4PoxsftIn-I,1323
50
- lmnr-0.5.1a0.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
51
- lmnr-0.5.1a0.dist-info/METADATA,sha256=2BpQewtLlMeR3u2OxJqzPnGwi4yvoyKs-0GP8TuzKz4,14998
52
- lmnr-0.5.1a0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
53
- lmnr-0.5.1a0.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
54
- lmnr-0.5.1a0.dist-info/RECORD,,
File without changes
File without changes