hivetrace 1.3.9__py3-none-any.whl → 1.3.11__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.
- hivetrace/client/base.py +3 -3
- hivetrace/models/requests.py +3 -3
- {hivetrace-1.3.9.dist-info → hivetrace-1.3.11.dist-info}/METADATA +44 -33
- {hivetrace-1.3.9.dist-info → hivetrace-1.3.11.dist-info}/RECORD +7 -7
- {hivetrace-1.3.9.dist-info → hivetrace-1.3.11.dist-info}/WHEEL +1 -1
- {hivetrace-1.3.9.dist-info → hivetrace-1.3.11.dist-info/licenses}/LICENSE +0 -0
- {hivetrace-1.3.9.dist-info → hivetrace-1.3.11.dist-info}/top_level.txt +0 -0
hivetrace/client/base.py
CHANGED
|
@@ -125,9 +125,9 @@ class BaseHivetraceSDK(ABC):
|
|
|
125
125
|
"""Extracts analysis id from API response if present."""
|
|
126
126
|
try:
|
|
127
127
|
if isinstance(response, dict):
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
request_id = response.get("request_id")
|
|
129
|
+
if request_id:
|
|
130
|
+
return str(request_id)
|
|
131
131
|
except Exception:
|
|
132
132
|
return None
|
|
133
133
|
return None
|
hivetrace/models/requests.py
CHANGED
|
@@ -15,10 +15,10 @@ class BaseRequest(BaseModel):
|
|
|
15
15
|
class MessageRequest(BaseRequest):
|
|
16
16
|
"""Base model for requests with message and additional parameters."""
|
|
17
17
|
|
|
18
|
-
application_id: str = Field(..., description="ID
|
|
19
|
-
message: str = Field(..., min_length=1, description="
|
|
18
|
+
application_id: str = Field(..., description="Application ID (UUID)")
|
|
19
|
+
message: str = Field(..., min_length=1, description="Message text")
|
|
20
20
|
additional_parameters: Optional[Dict[str, Any]] = Field(
|
|
21
|
-
None, description="
|
|
21
|
+
None, description="Additional parameters"
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
@validator("application_id")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: hivetrace
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.11
|
|
4
4
|
Summary: Hivetrace SDK for monitoring LLM applications
|
|
5
5
|
Home-page: http://hivetrace.ai
|
|
6
6
|
Author: Raft
|
|
@@ -10,32 +10,44 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
10
10
|
Requires-Python: >=3.8
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: httpx
|
|
14
|
-
Requires-Dist:
|
|
15
|
-
Requires-Dist:
|
|
16
|
-
Provides-Extra: all
|
|
17
|
-
Requires-Dist: crewai >=0.95.0 ; extra == 'all'
|
|
18
|
-
Requires-Dist: httpx >=0.28.1 ; extra == 'all'
|
|
19
|
-
Requires-Dist: langchain-community ==0.3.18 ; extra == 'all'
|
|
20
|
-
Requires-Dist: langchain-openai ==0.2.5 ; extra == 'all'
|
|
21
|
-
Requires-Dist: langchain ==0.3.19 ; extra == 'all'
|
|
22
|
-
Requires-Dist: langchain-experimental ==0.3.4 ; extra == 'all'
|
|
23
|
-
Requires-Dist: openai-agents >=0.1.0 ; extra == 'all'
|
|
24
|
-
Requires-Dist: pydantic >=2.11.7 ; extra == 'all'
|
|
25
|
-
Requires-Dist: python-dotenv >=1.0.1 ; extra == 'all'
|
|
13
|
+
Requires-Dist: httpx>=0.28.1
|
|
14
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
15
|
+
Requires-Dist: pydantic>=2.11.7
|
|
26
16
|
Provides-Extra: base
|
|
27
|
-
Requires-Dist: httpx
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Provides-Extra: crewai
|
|
31
|
-
Requires-Dist: crewai >=0.95.0 ; extra == 'crewai'
|
|
17
|
+
Requires-Dist: httpx>=0.28.1; extra == "base"
|
|
18
|
+
Requires-Dist: python-dotenv>=1.0.1; extra == "base"
|
|
19
|
+
Requires-Dist: pydantic>=2.11.7; extra == "base"
|
|
32
20
|
Provides-Extra: langchain
|
|
33
|
-
Requires-Dist: langchain-
|
|
34
|
-
Requires-Dist: langchain-
|
|
35
|
-
Requires-Dist: langchain
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Provides-Extra:
|
|
38
|
-
Requires-Dist:
|
|
21
|
+
Requires-Dist: langchain-openai==0.2.5; extra == "langchain"
|
|
22
|
+
Requires-Dist: langchain-community==0.3.18; extra == "langchain"
|
|
23
|
+
Requires-Dist: langchain==0.3.19; extra == "langchain"
|
|
24
|
+
Requires-Dist: langchain_experimental==0.3.4; extra == "langchain"
|
|
25
|
+
Provides-Extra: crewai
|
|
26
|
+
Requires-Dist: crewai>=0.95.0; extra == "crewai"
|
|
27
|
+
Provides-Extra: openai-agents
|
|
28
|
+
Requires-Dist: openai-agents>=0.1.0; extra == "openai-agents"
|
|
29
|
+
Provides-Extra: all
|
|
30
|
+
Requires-Dist: httpx>=0.28.1; extra == "all"
|
|
31
|
+
Requires-Dist: python-dotenv>=1.0.1; extra == "all"
|
|
32
|
+
Requires-Dist: pydantic>=2.11.7; extra == "all"
|
|
33
|
+
Requires-Dist: langchain-openai==0.2.5; extra == "all"
|
|
34
|
+
Requires-Dist: langchain-community==0.3.18; extra == "all"
|
|
35
|
+
Requires-Dist: langchain==0.3.19; extra == "all"
|
|
36
|
+
Requires-Dist: langchain_experimental==0.3.4; extra == "all"
|
|
37
|
+
Requires-Dist: crewai>=0.95.0; extra == "all"
|
|
38
|
+
Requires-Dist: openai-agents>=0.1.0; extra == "all"
|
|
39
|
+
Dynamic: author
|
|
40
|
+
Dynamic: author-email
|
|
41
|
+
Dynamic: classifier
|
|
42
|
+
Dynamic: description
|
|
43
|
+
Dynamic: description-content-type
|
|
44
|
+
Dynamic: home-page
|
|
45
|
+
Dynamic: keywords
|
|
46
|
+
Dynamic: license-file
|
|
47
|
+
Dynamic: provides-extra
|
|
48
|
+
Dynamic: requires-dist
|
|
49
|
+
Dynamic: requires-python
|
|
50
|
+
Dynamic: summary
|
|
39
51
|
|
|
40
52
|
# Hivetrace SDK
|
|
41
53
|
|
|
@@ -176,13 +188,13 @@ response = client.input(
|
|
|
176
188
|
"agent-1-id": {"name": "Agent 1", "description": "Agent description"},
|
|
177
189
|
"agent-2-id": {"name": "Agent 2"},
|
|
178
190
|
"agent-3-id": {}
|
|
179
|
-
}
|
|
191
|
+
},
|
|
192
|
+
# If you want to send only to censor and avoid DB persistence on backend
|
|
193
|
+
"censor_only": True,
|
|
180
194
|
}
|
|
181
195
|
)
|
|
182
196
|
```
|
|
183
197
|
|
|
184
|
-
> **Note:** `session_id`, `user_id`, and all agent IDs must be valid UUIDs.
|
|
185
|
-
|
|
186
198
|
---
|
|
187
199
|
|
|
188
200
|
## API
|
|
@@ -212,6 +224,7 @@ Sends a **user prompt** to Hivetrace.
|
|
|
212
224
|
* `application_id` — Application identifier (must be a valid UUID, created in the UI)
|
|
213
225
|
* `message` — The user prompt
|
|
214
226
|
* `additional_parameters` — Optional dictionary with extra context (session, user, agents, etc.)
|
|
227
|
+
- Supported special flags: `censor_only: bool` — when `True`, backend should not persist the message in DB and only pass it to the censor
|
|
215
228
|
* `files` — Optional list of tuples `(filename: str, content: bytes, mime_type: str)`; files are attached to the created analysis record
|
|
216
229
|
|
|
217
230
|
Response contains a `blocked` flag that indicates role restrictions.
|
|
@@ -226,8 +239,7 @@ Response contains a `blocked` flag that indicates role restrictions.
|
|
|
226
239
|
"is_toxic": false,
|
|
227
240
|
"type_of_violation": "benign",
|
|
228
241
|
"token_count": 9,
|
|
229
|
-
"
|
|
230
|
-
"token_usage_unbounded": false
|
|
242
|
+
"token_usage_severity": None
|
|
231
243
|
}
|
|
232
244
|
}
|
|
233
245
|
```
|
|
@@ -275,8 +287,7 @@ Response contains a `blocked` flag that indicates role restrictions.
|
|
|
275
287
|
"is_toxic": false,
|
|
276
288
|
"type_of_violation": "safe",
|
|
277
289
|
"token_count": 21,
|
|
278
|
-
"
|
|
279
|
-
"token_usage_unbounded": false
|
|
290
|
+
"token_usage_severity": None
|
|
280
291
|
}
|
|
281
292
|
}
|
|
282
293
|
```
|
|
@@ -22,7 +22,7 @@ hivetrace/adapters/utils/__init__.py,sha256=AkdJzecQlhT3hHFOIO5zWbAIEXvbgH_5vmzl
|
|
|
22
22
|
hivetrace/adapters/utils/logging.py,sha256=UxCMFvlpP6vJfzRwMYhhJIi7RTWdgVK2sWtCeEB67_w,1126
|
|
23
23
|
hivetrace/client/__init__.py,sha256=Daz_KxOMzGSBKUpv48tTooGZrmzk0wzDq8QUTHuBZBU,313
|
|
24
24
|
hivetrace/client/async_client.py,sha256=9uvimxP-Q7vY-bbZW5RiTEYQd8_uP3wyqR3s92kPGUs,6518
|
|
25
|
-
hivetrace/client/base.py,sha256=
|
|
25
|
+
hivetrace/client/base.py,sha256=7Ix53BHNr6MVfA5_ox4RhSKOzuETmZjuRqEE4JRfZVk,7881
|
|
26
26
|
hivetrace/client/sync_client.py,sha256=J3nKDVfVtfYL3NjlMtj5l7EpZKXupJnI1bpHy-tWgyE,6347
|
|
27
27
|
hivetrace/errors/__init__.py,sha256=3Sqr2Pz4NwE_u8CgTzVbzoNj-B52cwzdsHINnpWO3Yg,1006
|
|
28
28
|
hivetrace/errors/api.py,sha256=ThIoH8akPWuSqF6bqnex5f25p8ZBnRFsz2IrcivAHgc,1029
|
|
@@ -33,13 +33,13 @@ hivetrace/handlers/__init__.py,sha256=9edrtdJyvx8UkANmrjjVhg9f0kWMxfXVrmURTUrW6m
|
|
|
33
33
|
hivetrace/handlers/error_handler.py,sha256=aWLL--HKBm4h8AO4oQSpsFObq2TjHXntYXBDXWp-Q30,3774
|
|
34
34
|
hivetrace/handlers/response_builder.py,sha256=J3qDWxvi_jxiZ7AgmYscHfukbz4rmnSwBF2UaWkqzb4,2558
|
|
35
35
|
hivetrace/models/__init__.py,sha256=qQvtDkI0Awlch6c_kedH5Jq8aWn3XhDXbxbch5nf-RI,1020
|
|
36
|
-
hivetrace/models/requests.py,sha256=
|
|
36
|
+
hivetrace/models/requests.py,sha256=iv7NXm5q-tVzs-54o9DfydgE8aMV-AjLa0vgzjGaKCQ,2588
|
|
37
37
|
hivetrace/models/responses.py,sha256=U06Gc4ZU2WmaPxjy1Dg5BtTDad6MOBURiDPTeLyDtcE,3209
|
|
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.
|
|
42
|
-
hivetrace-1.3.
|
|
43
|
-
hivetrace-1.3.
|
|
44
|
-
hivetrace-1.3.
|
|
45
|
-
hivetrace-1.3.
|
|
41
|
+
hivetrace-1.3.11.dist-info/licenses/LICENSE,sha256=8d3g3prbWPDLQ5AV0dtyWfYTj5QPl8MJ_wlr2l8pjEU,11333
|
|
42
|
+
hivetrace-1.3.11.dist-info/METADATA,sha256=gmvQMgJOAIvNhJw7G9Qij0bytGY-UQph9r3Hk_r7_VE,28054
|
|
43
|
+
hivetrace-1.3.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
44
|
+
hivetrace-1.3.11.dist-info/top_level.txt,sha256=F6mZCzZ5CSftMc-M0NeOYWbwyTzjybR72P4qSBMyZZM,10
|
|
45
|
+
hivetrace-1.3.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|