hivetrace 1.3.14__py3-none-any.whl → 1.3.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.
@@ -47,8 +47,23 @@ class ResponseBuilder:
47
47
 
48
48
  Automatically determines the response type and creates the corresponding model.
49
49
  """
50
+ excluded_keys = {
51
+ "message_id",
52
+ "trace_id",
53
+ "request_id",
54
+ "success",
55
+ "timestamp",
56
+ "blocked",
57
+ }
58
+
59
+ status = api_response.get("status")
60
+ status_is_success = (
61
+ isinstance(status, str) and "success" in status.lower()
62
+ )
63
+
50
64
  if (
51
65
  api_response.get("success")
66
+ or status_is_success
52
67
  or "message_id" in api_response
53
68
  or "trace_id" in api_response
54
69
  ):
@@ -59,7 +74,7 @@ class ResponseBuilder:
59
74
  additional_data={
60
75
  k: v
61
76
  for k, v in api_response.items()
62
- if k not in ["message_id", "trace_id", "request_id"]
77
+ if k not in excluded_keys
63
78
  },
64
79
  )
65
80
 
@@ -7,7 +7,7 @@ class BaseResponse(BaseModel):
7
7
  """Base response model."""
8
8
 
9
9
  class Config:
10
- extra = "forbid"
10
+ extra = "allow"
11
11
  use_enum_values = True
12
12
 
13
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hivetrace
3
- Version: 1.3.14
3
+ Version: 1.3.16
4
4
  Summary: Hivetrace SDK for monitoring LLM applications
5
5
  Home-page: http://hivetrace.ai
6
6
  Author: Raft
@@ -31,15 +31,15 @@ hivetrace/errors/network.py,sha256=4GlFpUU9BV5Q1yoizadRQjDPLlIn7lh4Nyn8e7ZAQQg,6
31
31
  hivetrace/errors/validation.py,sha256=2XFgxumDAU8dZnkDiF_eFqANiqsc8lIsbwjrzcAva98,1020
32
32
  hivetrace/handlers/__init__.py,sha256=9edrtdJyvx8UkANmrjjVhg9f0kWMxfXVrmURTUrW6mg,435
33
33
  hivetrace/handlers/error_handler.py,sha256=aWLL--HKBm4h8AO4oQSpsFObq2TjHXntYXBDXWp-Q30,3774
34
- hivetrace/handlers/response_builder.py,sha256=p3mFHqetd2FYrbJc4j8PV6zI8OF9KtSyjifpPy8asjA,2590
34
+ hivetrace/handlers/response_builder.py,sha256=PaIT7DXMTLK5dXYDzyyWJHa-lxtloTGDWsqXhF2Ax-I,2933
35
35
  hivetrace/models/__init__.py,sha256=qQvtDkI0Awlch6c_kedH5Jq8aWn3XhDXbxbch5nf-RI,1020
36
36
  hivetrace/models/requests.py,sha256=iv7NXm5q-tVzs-54o9DfydgE8aMV-AjLa0vgzjGaKCQ,2588
37
- hivetrace/models/responses.py,sha256=U06Gc4ZU2WmaPxjy1Dg5BtTDad6MOBURiDPTeLyDtcE,3209
37
+ hivetrace/models/responses.py,sha256=F2IECVxZMAm5wfzRlsLdn9sdTT0qHEmPEnv0nJJ1G-U,3208
38
38
  hivetrace/utils/__init__.py,sha256=BNYbeSuUbrZL7RradjE_OFAxam3L6eexbL2IMfjImv0,747
39
39
  hivetrace/utils/error_helpers.py,sha256=egVQpENputLR8exNpV1cui2LSHqbf8pI6SHRbLdxOX8,2661
40
40
  hivetrace/utils/uuid_generator.py,sha256=W4i2tUSyClNKNgm4O-bk_Qkkmw3cWIuf29DjwXftx0c,344
41
- hivetrace-1.3.14.dist-info/licenses/LICENSE,sha256=8d3g3prbWPDLQ5AV0dtyWfYTj5QPl8MJ_wlr2l8pjEU,11333
42
- hivetrace-1.3.14.dist-info/METADATA,sha256=4ptdgEVUdwxzDN2LHBDb23wmVZNuXJ8BpxrI8FWT-OI,28054
43
- hivetrace-1.3.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
- hivetrace-1.3.14.dist-info/top_level.txt,sha256=F6mZCzZ5CSftMc-M0NeOYWbwyTzjybR72P4qSBMyZZM,10
45
- hivetrace-1.3.14.dist-info/RECORD,,
41
+ hivetrace-1.3.16.dist-info/licenses/LICENSE,sha256=8d3g3prbWPDLQ5AV0dtyWfYTj5QPl8MJ_wlr2l8pjEU,11333
42
+ hivetrace-1.3.16.dist-info/METADATA,sha256=CqBk5XpY5jcW9PhX8S-Snv0RAZjwlSrlwGRVlwYRlPg,28054
43
+ hivetrace-1.3.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
+ hivetrace-1.3.16.dist-info/top_level.txt,sha256=F6mZCzZ5CSftMc-M0NeOYWbwyTzjybR72P4qSBMyZZM,10
45
+ hivetrace-1.3.16.dist-info/RECORD,,