lmnr 0.5.1__tar.gz → 0.5.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 (59) hide show
  1. {lmnr-0.5.1 → lmnr-0.5.2}/PKG-INFO +57 -57
  2. {lmnr-0.5.1 → lmnr-0.5.2}/README.md +4 -4
  3. lmnr-0.5.2/pyproject.toml +126 -0
  4. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/__init__.py +0 -8
  5. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/__init__.py +4 -0
  6. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/decorators/base.py +20 -13
  7. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/instruments.py +1 -0
  8. lmnr-0.5.2/src/lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/__init__.py +454 -0
  9. lmnr-0.5.2/src/lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/config.py +9 -0
  10. lmnr-0.5.2/src/lmnr/openllmetry_sdk/opentelemetry/instrumentation/google_genai/utils.py +216 -0
  11. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/tracing/tracing.py +30 -8
  12. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/asynchronous/async_client.py +0 -26
  13. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/asynchronous/resources/__init__.py +0 -4
  14. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/asynchronous/resources/agent.py +96 -6
  15. lmnr-0.5.2/src/lmnr/sdk/client/synchronous/resources/__init__.py +5 -0
  16. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/synchronous/resources/agent.py +94 -8
  17. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/synchronous/sync_client.py +0 -28
  18. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/decorators.py +16 -2
  19. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/laminar.py +2 -2
  20. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/types.py +84 -170
  21. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/utils.py +8 -1
  22. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/version.py +1 -1
  23. lmnr-0.5.1/pyproject.toml +0 -122
  24. lmnr-0.5.1/src/lmnr/sdk/client/asynchronous/resources/pipeline.py +0 -89
  25. lmnr-0.5.1/src/lmnr/sdk/client/asynchronous/resources/semantic_search.py +0 -60
  26. lmnr-0.5.1/src/lmnr/sdk/client/synchronous/resources/__init__.py +0 -7
  27. lmnr-0.5.1/src/lmnr/sdk/client/synchronous/resources/pipeline.py +0 -89
  28. lmnr-0.5.1/src/lmnr/sdk/client/synchronous/resources/semantic_search.py +0 -60
  29. {lmnr-0.5.1 → lmnr-0.5.2}/LICENSE +0 -0
  30. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/cli.py +0 -0
  31. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/.flake8 +0 -0
  32. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/config/__init__.py +0 -0
  33. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/decorators/__init__.py +0 -0
  34. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/tracing/__init__.py +0 -0
  35. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/tracing/attributes.py +0 -0
  36. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/tracing/content_allow_list.py +0 -0
  37. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/tracing/context_manager.py +0 -0
  38. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/utils/__init__.py +0 -0
  39. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/utils/in_memory_span_exporter.py +0 -0
  40. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/utils/json_encoder.py +0 -0
  41. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/openllmetry_sdk/utils/package_check.py +0 -0
  42. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/py.typed +0 -0
  43. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/__init__.py +0 -0
  44. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/browser/__init__.py +0 -0
  45. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/browser/browser_use_otel.py +0 -0
  46. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/browser/playwright_otel.py +0 -0
  47. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/browser/pw_utils.py +0 -0
  48. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/browser/rrweb/rrweb.min.js +0 -0
  49. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/browser/utils.py +0 -0
  50. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/asynchronous/resources/base.py +0 -0
  51. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/asynchronous/resources/browser_events.py +0 -0
  52. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/asynchronous/resources/evals.py +0 -0
  53. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/synchronous/resources/base.py +0 -0
  54. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/synchronous/resources/browser_events.py +0 -0
  55. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/client/synchronous/resources/evals.py +0 -0
  56. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/datasets.py +0 -0
  57. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/eval_control.py +0 -0
  58. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/evaluations.py +0 -0
  59. {lmnr-0.5.1 → lmnr-0.5.2}/src/lmnr/sdk/log.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lmnr
3
- Version: 0.5.1
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
 
@@ -226,9 +226,9 @@ for chunk in client.agent.run(
226
226
  prompt="What is the weather in London today?",
227
227
  stream=True
228
228
  ):
229
- if chunk.chunkType == 'step':
229
+ if chunk.chunk_type == 'step':
230
230
  print(chunk.summary)
231
- elif chunk.chunkType == 'finalOutput':
231
+ elif chunk.chunk_type == 'finalOutput':
232
232
  print(chunk.content.result.content)
233
233
  ```
234
234
 
@@ -262,8 +262,8 @@ async for chunk in client.agent.run(
262
262
  prompt="What is the weather in London today?",
263
263
  stream=True
264
264
  ):
265
- if chunk.chunkType == 'step':
265
+ if chunk.chunk_type == 'step':
266
266
  print(chunk.summary)
267
- elif chunk.chunkType == 'finalOutput':
267
+ elif chunk.chunk_type == 'finalOutput':
268
268
  print(chunk.content.result.content)
269
269
  ```
@@ -0,0 +1,126 @@
1
+ # Laminar Python
2
+
3
+ # If you are looking for information about possible extras installations,
4
+ # i.e. what you can pass into `pip install 'lmnr[extra1,extra2]'`, please see the
5
+ # `[project.optional-dependencies]` section below.
6
+
7
+ [project]
8
+ name = "lmnr"
9
+ version = "0.5.2"
10
+ description = "Python SDK for Laminar"
11
+ authors = [
12
+ { name = "lmnr.ai", email = "founders@lmnr.ai" }
13
+ ]
14
+ readme = "README.md"
15
+ requires-python = ">=3.9,<4"
16
+ license = "Apache-2.0"
17
+ dependencies = [
18
+ "pydantic (>=2.0.3,<3.0.0)",
19
+ "python-dotenv (>=1.0)",
20
+ "opentelemetry-api (>=1.31.1)",
21
+ "opentelemetry-sdk (>=1.31.1)",
22
+ "opentelemetry-exporter-otlp-proto-http (>=1.31.1)",
23
+ "opentelemetry-exporter-otlp-proto-grpc (>=1.31.1)",
24
+ "opentelemetry-instrumentation-requests (>=0.52b0)",
25
+ "opentelemetry-instrumentation-sqlalchemy (>=0.52b0)",
26
+ "opentelemetry-instrumentation-urllib3 (>=0.52b0)",
27
+ "opentelemetry-instrumentation-threading (>=0.52b0)",
28
+ "opentelemetry-semantic-conventions-ai (>=0.4.2)",
29
+ "tqdm (>=4.0)",
30
+ "argparse (>=1.0)",
31
+ "tenacity (>=8.0)",
32
+ # explicitly freeze grpcio. Since 1.68.0, grpcio writes a warning message
33
+ # that looks scary, but is harmless.
34
+ # WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
35
+ # E0000 00:00:1737439981.199902 9456033 init.cc:229] grpc_wait_for_shutdown_with_timeout() timed out.
36
+ #
37
+ # Related issue:
38
+ # https://discuss.ai.google.dev/t/warning-all-log-messages-before-absl-initializelog-is-called-are-written-to-stderr-e0000-001731955515-629532-17124-init-cc-229-grpc-wait-for-shutdown-with-timeout-timed-out/50020
39
+ # https://github.com/grpc/grpc/issues/38490
40
+ "grpcio<1.68.0",
41
+ "httpx>=0.25.0",
42
+ ]
43
+
44
+ [project.scripts]
45
+ lmnr = "lmnr.cli:cli"
46
+
47
+ [project.optional-dependencies]
48
+ # List of all possible extras. You can specify one or more of these extras
49
+ # when installing the package, using any of the following examples:
50
+ # `pip install 'lmnr[anthropic,openai]'`
51
+ # `uv pip install 'lmnr[anthropic,openai]'`
52
+ # `uv add lmnr --extra anthropic --extra openai`
53
+ # `poetry add 'lmnr[anthropic,openai]'`
54
+
55
+ alephalpha=["opentelemetry-instrumentation-alephalpha>=0.39.2"]
56
+ anthropic=["opentelemetry-instrumentation-anthropic>=0.39.2"]
57
+ bedrock=["opentelemetry-instrumentation-bedrock>=0.39.2"]
58
+ chromadb=["opentelemetry-instrumentation-chromadb>=0.39.2"]
59
+ cohere=["opentelemetry-instrumentation-cohere>=0.39.2"]
60
+ google-generativeai=["opentelemetry-instrumentation-google-generativeai>=0.39.2"]
61
+ groq=["opentelemetry-instrumentation-groq>=0.39.2"]
62
+ haystack=["opentelemetry-instrumentation-haystack>=0.39.2"]
63
+ lancedb=["opentelemetry-instrumentation-lancedb>=0.39.2"]
64
+ langchain=["opentelemetry-instrumentation-langchain>=0.39.2"]
65
+ llamaindex=["opentelemetry-instrumentation-llamaindex>=0.39.2"]
66
+ marqo=["opentelemetry-instrumentation-marqo>=0.39.2"]
67
+ milvus=["opentelemetry-instrumentation-milvus>=0.39.2"]
68
+ mistralai=["opentelemetry-instrumentation-mistralai>=0.39.2"]
69
+ ollama=["opentelemetry-instrumentation-ollama>=0.39.2"]
70
+ openai=["opentelemetry-instrumentation-openai>=0.39.2"]
71
+ pinecone=["opentelemetry-instrumentation-pinecone>=0.39.2"]
72
+ qdrant=["opentelemetry-instrumentation-qdrant>=0.39.2"]
73
+ replicate=["opentelemetry-instrumentation-replicate>=0.39.2"]
74
+ sagemaker=["opentelemetry-instrumentation-sagemaker>=0.39.2"]
75
+ together=["opentelemetry-instrumentation-together>=0.39.2"]
76
+ transformers=["opentelemetry-instrumentation-transformers>=0.39.2"]
77
+ vertexai=["opentelemetry-instrumentation-vertexai>=0.39.2"]
78
+ watsonx=["opentelemetry-instrumentation-watsonx>=0.39.2"]
79
+ weaviate=["opentelemetry-instrumentation-weaviate>=0.39.2"]
80
+ # `all` is the group added for convenience, if you want to install all
81
+ # the instrumentations.
82
+ all = [
83
+ "opentelemetry-instrumentation-alephalpha>=0.39.2",
84
+ "opentelemetry-instrumentation-anthropic>=0.39.2",
85
+ "opentelemetry-instrumentation-bedrock>=0.39.2",
86
+ "opentelemetry-instrumentation-chromadb>=0.39.2",
87
+ "opentelemetry-instrumentation-cohere>=0.39.2",
88
+ "opentelemetry-instrumentation-google-generativeai>=0.39.2",
89
+ "opentelemetry-instrumentation-groq>=0.39.2",
90
+ "opentelemetry-instrumentation-haystack>=0.39.2",
91
+ "opentelemetry-instrumentation-lancedb>=0.39.2",
92
+ "opentelemetry-instrumentation-langchain>=0.39.2",
93
+ "opentelemetry-instrumentation-llamaindex>=0.39.2",
94
+ "opentelemetry-instrumentation-marqo>=0.39.2",
95
+ "opentelemetry-instrumentation-milvus>=0.39.2",
96
+ "opentelemetry-instrumentation-mistralai>=0.39.2",
97
+ "opentelemetry-instrumentation-ollama>=0.39.2",
98
+ "opentelemetry-instrumentation-openai>=0.39.2",
99
+ "opentelemetry-instrumentation-pinecone>=0.39.2",
100
+ "opentelemetry-instrumentation-qdrant>=0.39.2",
101
+ "opentelemetry-instrumentation-replicate>=0.39.2",
102
+ "opentelemetry-instrumentation-sagemaker>=0.39.2",
103
+ "opentelemetry-instrumentation-together>=0.39.2",
104
+ "opentelemetry-instrumentation-transformers>=0.39.2",
105
+ "opentelemetry-instrumentation-vertexai>=0.39.2",
106
+ "opentelemetry-instrumentation-watsonx>=0.39.2",
107
+ "opentelemetry-instrumentation-weaviate>=0.39.2"
108
+ ]
109
+
110
+ [dependency-groups]
111
+ dev = [
112
+ "autopep8",
113
+ "flake8",
114
+ "pytest>=8.3.5",
115
+ "pytest-sugar>=1.0.0",
116
+ "pytest-asyncio>=0.26.0",
117
+ "playwright>=1.51.0"
118
+ ]
119
+
120
+ [build-system]
121
+ requires = ["poetry-core"]
122
+ build-backend = "poetry.core.masonry.api"
123
+ # we can move to uv_build, once it's more stable
124
+ # https://github.com/astral-sh/uv/issues/3957
125
+ # requires = ["uv_build>=0.6.16,<0.7"]
126
+ # build-backend = "uv_build"
@@ -6,11 +6,7 @@ from .sdk.laminar import Laminar
6
6
  from .sdk.types import (
7
7
  AgentOutput,
8
8
  FinalOutputChunkContent,
9
- ChatMessage,
10
9
  HumanEvaluator,
11
- NodeInput,
12
- PipelineRunError,
13
- PipelineRunResponse,
14
10
  RunAgentResponseChunk,
15
11
  StepChunkContent,
16
12
  TracingLevel,
@@ -25,7 +21,6 @@ __all__ = [
25
21
  "AgentOutput",
26
22
  "AsyncLaminarClient",
27
23
  "Attributes",
28
- "ChatMessage",
29
24
  "EvaluationDataset",
30
25
  "FinalOutputChunkContent",
31
26
  "HumanEvaluator",
@@ -34,9 +29,6 @@ __all__ = [
34
29
  "LaminarClient",
35
30
  "LaminarDataset",
36
31
  "LaminarSpanContext",
37
- "NodeInput",
38
- "PipelineRunError",
39
- "PipelineRunResponse",
40
32
  "RunAgentResponseChunk",
41
33
  "StepChunkContent",
42
34
  "TracingLevel",
@@ -69,3 +69,7 @@ class TracerManager:
69
69
  @staticmethod
70
70
  def flush() -> bool:
71
71
  return TracerManager.__tracer_wrapper.flush()
72
+
73
+ @staticmethod
74
+ def shutdown():
75
+ TracerManager.__tracer_wrapper.shutdown()
@@ -1,7 +1,6 @@
1
1
  import json
2
2
  from functools import wraps
3
3
  import logging
4
- import os
5
4
  import pydantic
6
5
  import types
7
6
  from typing import Any, Literal, Optional, Union
@@ -40,6 +39,7 @@ def json_dumps(data: dict) -> str:
40
39
  def entity_method(
41
40
  name: Optional[str] = None,
42
41
  ignore_input: bool = False,
42
+ ignore_inputs: Optional[list[str]] = None,
43
43
  ignore_output: bool = False,
44
44
  span_type: Union[Literal["DEFAULT"], Literal["LLM"], Literal["TOOL"]] = "DEFAULT",
45
45
  ):
@@ -58,9 +58,15 @@ def entity_method(
58
58
  ctx_token = context_api.attach(ctx)
59
59
 
60
60
  try:
61
- if _should_send_prompts() and not ignore_input:
61
+ if not ignore_input:
62
62
  inp = json_dumps(
63
- get_input_from_func_args(fn, is_method(fn), args, kwargs)
63
+ get_input_from_func_args(
64
+ fn,
65
+ is_method=is_method(fn),
66
+ func_args=args,
67
+ func_kwargs=kwargs,
68
+ ignore_inputs=ignore_inputs,
69
+ )
64
70
  )
65
71
  if len(inp) > MAX_MANUAL_SPAN_PAYLOAD_SIZE:
66
72
  span.set_attribute(
@@ -83,7 +89,7 @@ def entity_method(
83
89
  return _handle_generator(span, res)
84
90
 
85
91
  try:
86
- if _should_send_prompts() and not ignore_output:
92
+ if not ignore_output:
87
93
  output = json_dumps(res)
88
94
  if len(output) > MAX_MANUAL_SPAN_PAYLOAD_SIZE:
89
95
  span.set_attribute(
@@ -108,6 +114,7 @@ def entity_method(
108
114
  def aentity_method(
109
115
  name: Optional[str] = None,
110
116
  ignore_input: bool = False,
117
+ ignore_inputs: Optional[list[str]] = None,
111
118
  ignore_output: bool = False,
112
119
  span_type: Union[Literal["DEFAULT"], Literal["LLM"], Literal["TOOL"]] = "DEFAULT",
113
120
  ):
@@ -126,9 +133,15 @@ def aentity_method(
126
133
  ctx_token = context_api.attach(ctx)
127
134
 
128
135
  try:
129
- if _should_send_prompts() and not ignore_input:
136
+ if not ignore_input:
130
137
  inp = json_dumps(
131
- get_input_from_func_args(fn, is_method(fn), args, kwargs)
138
+ get_input_from_func_args(
139
+ fn,
140
+ is_method=is_method(fn),
141
+ func_args=args,
142
+ func_kwargs=kwargs,
143
+ ignore_inputs=ignore_inputs,
144
+ )
132
145
  )
133
146
  if len(inp) > MAX_MANUAL_SPAN_PAYLOAD_SIZE:
134
147
  span.set_attribute(
@@ -151,7 +164,7 @@ def aentity_method(
151
164
  return await _ahandle_generator(span, ctx_token, res)
152
165
 
153
166
  try:
154
- if _should_send_prompts() and not ignore_output:
167
+ if not ignore_output:
155
168
  output = json_dumps(res)
156
169
  if len(output) > MAX_MANUAL_SPAN_PAYLOAD_SIZE:
157
170
  span.set_attribute(
@@ -192,12 +205,6 @@ async def _ahandle_generator(span, ctx_token, res):
192
205
  context_api.detach(ctx_token)
193
206
 
194
207
 
195
- def _should_send_prompts():
196
- return (
197
- os.getenv("TRACELOOP_TRACE_CONTENT") or "true"
198
- ).lower() == "true" or context_api.get_value("override_enable_content_tracing")
199
-
200
-
201
208
  def _process_exception(span: Span, e: Exception):
202
209
  # Note that this `escaped` is sent as a StringValue("True"), not a boolean.
203
210
  span.record_exception(e, escaped=True)
@@ -11,6 +11,7 @@ class Instruments(Enum):
11
11
  CHROMA = "chroma"
12
12
  COHERE = "cohere"
13
13
  GOOGLE_GENERATIVEAI = "google_generativeai"
14
+ GOOGLE_GENAI = "google_genai"
14
15
  GROQ = "groq"
15
16
  HAYSTACK = "haystack"
16
17
  LANCEDB = "lancedb"