hivetrace 1.3.9__tar.gz → 1.3.11__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 (50) hide show
  1. {hivetrace-1.3.9 → hivetrace-1.3.11}/PKG-INFO +45 -13
  2. {hivetrace-1.3.9 → hivetrace-1.3.11}/README.md +6 -7
  3. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/client/base.py +3 -3
  4. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/models/requests.py +3 -3
  5. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace.egg-info/PKG-INFO +45 -13
  6. {hivetrace-1.3.9 → hivetrace-1.3.11}/setup.py +1 -1
  7. {hivetrace-1.3.9 → hivetrace-1.3.11}/LICENSE +0 -0
  8. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/__init__.py +0 -0
  9. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/__init__.py +0 -0
  10. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/base_adapter.py +0 -0
  11. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/crewai/__init__.py +0 -0
  12. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/crewai/adapter.py +0 -0
  13. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/crewai/decorators.py +0 -0
  14. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/crewai/monitored_agent.py +0 -0
  15. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/crewai/monitored_crew.py +0 -0
  16. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/crewai/tool_wrapper.py +0 -0
  17. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/langchain/__init__.py +0 -0
  18. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/langchain/adapter.py +0 -0
  19. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/langchain/api.py +0 -0
  20. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/langchain/behavior_tracker.py +0 -0
  21. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/langchain/callback.py +0 -0
  22. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/langchain/decorators.py +0 -0
  23. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/langchain/models.py +0 -0
  24. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/openai_agents/__init__.py +0 -0
  25. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/openai_agents/adapter.py +0 -0
  26. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/openai_agents/models.py +0 -0
  27. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/openai_agents/tracing.py +0 -0
  28. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/utils/__init__.py +0 -0
  29. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/adapters/utils/logging.py +0 -0
  30. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/client/__init__.py +0 -0
  31. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/client/async_client.py +0 -0
  32. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/client/sync_client.py +0 -0
  33. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/errors/__init__.py +0 -0
  34. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/errors/api.py +0 -0
  35. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/errors/base.py +0 -0
  36. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/errors/network.py +0 -0
  37. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/errors/validation.py +0 -0
  38. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/handlers/__init__.py +0 -0
  39. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/handlers/error_handler.py +0 -0
  40. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/handlers/response_builder.py +0 -0
  41. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/models/__init__.py +0 -0
  42. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/models/responses.py +0 -0
  43. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/utils/__init__.py +0 -0
  44. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/utils/error_helpers.py +0 -0
  45. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace/utils/uuid_generator.py +0 -0
  46. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace.egg-info/SOURCES.txt +0 -0
  47. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace.egg-info/dependency_links.txt +0 -0
  48. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace.egg-info/requires.txt +7 -7
  49. {hivetrace-1.3.9 → hivetrace-1.3.11}/hivetrace.egg-info/top_level.txt +0 -0
  50. {hivetrace-1.3.9 → hivetrace-1.3.11}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: hivetrace
3
- Version: 1.3.9
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
@@ -9,12 +9,45 @@ Keywords: SDK,monitoring,logging,LLM,AI,Hivetrace
9
9
  Classifier: License :: OSI Approved :: Apache Software License
10
10
  Requires-Python: >=3.8
11
11
  Description-Content-Type: text/markdown
12
- Provides-Extra: all
12
+ License-File: LICENSE
13
+ Requires-Dist: httpx>=0.28.1
14
+ Requires-Dist: python-dotenv>=1.0.1
15
+ Requires-Dist: pydantic>=2.11.7
13
16
  Provides-Extra: base
14
- Provides-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"
15
20
  Provides-Extra: langchain
16
- Provides-Extra: openai_agents
17
- License-File: LICENSE
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
18
51
 
19
52
  # Hivetrace SDK
20
53
 
@@ -155,13 +188,13 @@ response = client.input(
155
188
  "agent-1-id": {"name": "Agent 1", "description": "Agent description"},
156
189
  "agent-2-id": {"name": "Agent 2"},
157
190
  "agent-3-id": {}
158
- }
191
+ },
192
+ # If you want to send only to censor and avoid DB persistence on backend
193
+ "censor_only": True,
159
194
  }
160
195
  )
161
196
  ```
162
197
 
163
- > **Note:** `session_id`, `user_id`, and all agent IDs must be valid UUIDs.
164
-
165
198
  ---
166
199
 
167
200
  ## API
@@ -191,6 +224,7 @@ Sends a **user prompt** to Hivetrace.
191
224
  * `application_id` — Application identifier (must be a valid UUID, created in the UI)
192
225
  * `message` — The user prompt
193
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
194
228
  * `files` — Optional list of tuples `(filename: str, content: bytes, mime_type: str)`; files are attached to the created analysis record
195
229
 
196
230
  Response contains a `blocked` flag that indicates role restrictions.
@@ -205,8 +239,7 @@ Response contains a `blocked` flag that indicates role restrictions.
205
239
  "is_toxic": false,
206
240
  "type_of_violation": "benign",
207
241
  "token_count": 9,
208
- "token_usage_warning": false,
209
- "token_usage_unbounded": false
242
+ "token_usage_severity": None
210
243
  }
211
244
  }
212
245
  ```
@@ -254,8 +287,7 @@ Response contains a `blocked` flag that indicates role restrictions.
254
287
  "is_toxic": false,
255
288
  "type_of_violation": "safe",
256
289
  "token_count": 21,
257
- "token_usage_warning": false,
258
- "token_usage_unbounded": false
290
+ "token_usage_severity": None
259
291
  }
260
292
  }
261
293
  ```
@@ -137,13 +137,13 @@ response = client.input(
137
137
  "agent-1-id": {"name": "Agent 1", "description": "Agent description"},
138
138
  "agent-2-id": {"name": "Agent 2"},
139
139
  "agent-3-id": {}
140
- }
140
+ },
141
+ # If you want to send only to censor and avoid DB persistence on backend
142
+ "censor_only": True,
141
143
  }
142
144
  )
143
145
  ```
144
146
 
145
- > **Note:** `session_id`, `user_id`, and all agent IDs must be valid UUIDs.
146
-
147
147
  ---
148
148
 
149
149
  ## API
@@ -173,6 +173,7 @@ Sends a **user prompt** to Hivetrace.
173
173
  * `application_id` — Application identifier (must be a valid UUID, created in the UI)
174
174
  * `message` — The user prompt
175
175
  * `additional_parameters` — Optional dictionary with extra context (session, user, agents, etc.)
176
+ - Supported special flags: `censor_only: bool` — when `True`, backend should not persist the message in DB and only pass it to the censor
176
177
  * `files` — Optional list of tuples `(filename: str, content: bytes, mime_type: str)`; files are attached to the created analysis record
177
178
 
178
179
  Response contains a `blocked` flag that indicates role restrictions.
@@ -187,8 +188,7 @@ Response contains a `blocked` flag that indicates role restrictions.
187
188
  "is_toxic": false,
188
189
  "type_of_violation": "benign",
189
190
  "token_count": 9,
190
- "token_usage_warning": false,
191
- "token_usage_unbounded": false
191
+ "token_usage_severity": None
192
192
  }
193
193
  }
194
194
  ```
@@ -236,8 +236,7 @@ Response contains a `blocked` flag that indicates role restrictions.
236
236
  "is_toxic": false,
237
237
  "type_of_violation": "safe",
238
238
  "token_count": 21,
239
- "token_usage_warning": false,
240
- "token_usage_unbounded": false
239
+ "token_usage_severity": None
241
240
  }
242
241
  }
243
242
  ```
@@ -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
- monitoring_result = response.get("monitoring_result", {})
129
- analysis_id = monitoring_result.get("id")
130
- return str(analysis_id) if analysis_id is not None else None
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
@@ -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 приложения (UUID)")
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
1
+ Metadata-Version: 2.4
2
2
  Name: hivetrace
3
- Version: 1.3.9
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
@@ -9,12 +9,45 @@ Keywords: SDK,monitoring,logging,LLM,AI,Hivetrace
9
9
  Classifier: License :: OSI Approved :: Apache Software License
10
10
  Requires-Python: >=3.8
11
11
  Description-Content-Type: text/markdown
12
- Provides-Extra: all
12
+ License-File: LICENSE
13
+ Requires-Dist: httpx>=0.28.1
14
+ Requires-Dist: python-dotenv>=1.0.1
15
+ Requires-Dist: pydantic>=2.11.7
13
16
  Provides-Extra: base
14
- Provides-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"
15
20
  Provides-Extra: langchain
16
- Provides-Extra: openai_agents
17
- License-File: LICENSE
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
18
51
 
19
52
  # Hivetrace SDK
20
53
 
@@ -155,13 +188,13 @@ response = client.input(
155
188
  "agent-1-id": {"name": "Agent 1", "description": "Agent description"},
156
189
  "agent-2-id": {"name": "Agent 2"},
157
190
  "agent-3-id": {}
158
- }
191
+ },
192
+ # If you want to send only to censor and avoid DB persistence on backend
193
+ "censor_only": True,
159
194
  }
160
195
  )
161
196
  ```
162
197
 
163
- > **Note:** `session_id`, `user_id`, and all agent IDs must be valid UUIDs.
164
-
165
198
  ---
166
199
 
167
200
  ## API
@@ -191,6 +224,7 @@ Sends a **user prompt** to Hivetrace.
191
224
  * `application_id` — Application identifier (must be a valid UUID, created in the UI)
192
225
  * `message` — The user prompt
193
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
194
228
  * `files` — Optional list of tuples `(filename: str, content: bytes, mime_type: str)`; files are attached to the created analysis record
195
229
 
196
230
  Response contains a `blocked` flag that indicates role restrictions.
@@ -205,8 +239,7 @@ Response contains a `blocked` flag that indicates role restrictions.
205
239
  "is_toxic": false,
206
240
  "type_of_violation": "benign",
207
241
  "token_count": 9,
208
- "token_usage_warning": false,
209
- "token_usage_unbounded": false
242
+ "token_usage_severity": None
210
243
  }
211
244
  }
212
245
  ```
@@ -254,8 +287,7 @@ Response contains a `blocked` flag that indicates role restrictions.
254
287
  "is_toxic": false,
255
288
  "type_of_violation": "safe",
256
289
  "token_count": 21,
257
- "token_usage_warning": false,
258
- "token_usage_unbounded": false
290
+ "token_usage_severity": None
259
291
  }
260
292
  }
261
293
  ```
@@ -29,7 +29,7 @@ openai_agents_requires = [
29
29
 
30
30
  setup(
31
31
  name="hivetrace",
32
- version="1.3.9",
32
+ version="1.3.11",
33
33
  author="Raft",
34
34
  author_email="sales@raftds.com",
35
35
  description="Hivetrace SDK for monitoring LLM applications",
File without changes
@@ -1,29 +1,29 @@
1
1
  httpx>=0.28.1
2
- pydantic>=2.11.7
3
2
  python-dotenv>=1.0.1
3
+ pydantic>=2.11.7
4
4
 
5
5
  [all]
6
- crewai>=0.95.0
7
6
  httpx>=0.28.1
8
- langchain-community==0.3.18
7
+ python-dotenv>=1.0.1
8
+ pydantic>=2.11.7
9
9
  langchain-openai==0.2.5
10
+ langchain-community==0.3.18
10
11
  langchain==0.3.19
11
12
  langchain_experimental==0.3.4
13
+ crewai>=0.95.0
12
14
  openai-agents>=0.1.0
13
- pydantic>=2.11.7
14
- python-dotenv>=1.0.1
15
15
 
16
16
  [base]
17
17
  httpx>=0.28.1
18
- pydantic>=2.11.7
19
18
  python-dotenv>=1.0.1
19
+ pydantic>=2.11.7
20
20
 
21
21
  [crewai]
22
22
  crewai>=0.95.0
23
23
 
24
24
  [langchain]
25
- langchain-community==0.3.18
26
25
  langchain-openai==0.2.5
26
+ langchain-community==0.3.18
27
27
  langchain==0.3.19
28
28
  langchain_experimental==0.3.4
29
29
 
File without changes