lmnr 0.3.2__tar.gz → 0.3.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lmnr
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Python SDK for Laminar AI
5
5
  License: Apache-2.0
6
6
  Author: lmnr.ai
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lmnr"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "Python SDK for Laminar AI"
5
5
  authors = [
6
6
  { name = "lmnr.ai", email = "founders@lmnr.ai" }
@@ -11,7 +11,7 @@ license = "Apache-2.0"
11
11
 
12
12
  [tool.poetry]
13
13
  name = "lmnr"
14
- version = "0.3.2"
14
+ version = "0.3.3"
15
15
  description = "Python SDK for Laminar AI"
16
16
  authors = ["lmnr.ai"]
17
17
  readme = "README.md"
@@ -284,7 +284,7 @@ class LaminarContextManager:
284
284
  def event(
285
285
  self,
286
286
  name: str,
287
- value: Optional[Union[str, int]] = None,
287
+ value: Optional[Union[str, int, float, bool]] = None,
288
288
  timestamp: Optional[datetime.datetime] = None,
289
289
  ):
290
290
  span = _lmnr_stack_context.get()[-1] if _lmnr_stack_context.get() else None
@@ -142,14 +142,14 @@ class LaminarDecorator:
142
142
  def event(
143
143
  self,
144
144
  name: str,
145
- value: Optional[Union[str, int]] = None,
145
+ value: Optional[Union[str, int, float, bool]] = None,
146
146
  timestamp: Optional[datetime.datetime] = None,
147
147
  ):
148
148
  """Associate an event with the current span
149
149
 
150
150
  Args:
151
151
  name (str): name of the event. Must be predefined in the Laminar events page.
152
- value (Optional[Union[str, int]], optional): value of the event. Must match range definition in Laminar events page. Defaults to None.
152
+ value (Optional[Union[str, int, float, bool]], optional): value of the event. Must match range definition in Laminar events page. Defaults to None.
153
153
  timestamp (Optional[datetime.datetime], optional): If you need custom timestamp. If not specified, current time is used. Defaults to None.
154
154
  """
155
155
  laminar = LaminarSingleton().get()
@@ -156,14 +156,14 @@ class SpanContext(ObservationContext):
156
156
  def event(
157
157
  self,
158
158
  name: str,
159
- value: Optional[Union[str, int]] = None,
159
+ value: Optional[Union[str, int, float, bool]] = None,
160
160
  timestamp: Optional[datetime.datetime] = None,
161
161
  ) -> "SpanContext":
162
162
  """Associate an event with the current span
163
163
 
164
164
  Args:
165
165
  name (str): name of the event. Must be predefined in the Laminar events page.
166
- value (Optional[Union[str, int]], optional): value of the event. Must match range definition in Laminar events page. Defaults to None.
166
+ value (Optional[Union[str, int, float, bool]], optional): value of the event. Must match range definition in Laminar events page. Defaults to None.
167
167
  timestamp (Optional[datetime.datetime], optional): If you need custom timestamp. If not specified, current time is used. Defaults to None.
168
168
 
169
169
  Returns:
@@ -160,14 +160,14 @@ class Event(pydantic.BaseModel):
160
160
  templateName: str
161
161
  timestamp: datetime.datetime
162
162
  spanId: uuid.UUID
163
- value: Optional[Union[int, str]] = None
163
+ value: Optional[Union[int, str, float, bool]] = None
164
164
 
165
165
  def __init__(
166
166
  self,
167
167
  name: str,
168
168
  span_id: uuid.UUID,
169
169
  timestamp: Optional[datetime.datetime] = None,
170
- value: Optional[Union[int, str]] = None,
170
+ value: Optional[Union[int, str, float, bool]] = None,
171
171
  ):
172
172
  super().__init__(
173
173
  id=uuid.uuid4(),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes