shiftaiagenticinfra-sdk-python 0.0.7__tar.gz → 0.0.8__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.
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/PKG-INFO +12 -4
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/README.md +11 -3
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/pyproject.toml +1 -1
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/messages_api.py +21 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/models/__init__.py +15 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftaiagenticinfra_sdk_python.egg-info/PKG-INFO +12 -4
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/setup.cfg +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/setup.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/__init__.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/__init__.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/agents_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/analytics_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/conversations_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/internal/__init__.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/internal/trulens_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/platform_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/platform_session_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/api/users_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/client.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/http/__init__.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/http/exceptions.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/http/http_client.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftaiagenticinfra_sdk_python.egg-info/SOURCES.txt +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftaiagenticinfra_sdk_python.egg-info/dependency_links.txt +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftaiagenticinfra_sdk_python.egg-info/requires.txt +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftaiagenticinfra_sdk_python.egg-info/top_level.txt +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/tests/test_integration.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shiftaiagenticinfra-sdk-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.8
|
|
4
4
|
Summary: Shiftai Agentic Infra Python SDK
|
|
5
5
|
Author: ShiftAI
|
|
6
6
|
Author-email: ShiftAI <s.tadakamalla@theshiftai.in>
|
|
@@ -311,6 +311,14 @@ Get all messages sent by a specific agent.
|
|
|
311
311
|
|
|
312
312
|
**Return Type:** `List[PlatformMessage]`
|
|
313
313
|
|
|
314
|
+
#### `await messages.delete_message(message_id)`
|
|
315
|
+
delete a message turn (bot message and its paired human message). Idempotent if already deleted.
|
|
316
|
+
|
|
317
|
+
**Parameters:**
|
|
318
|
+
- `message_id` (UUID, required): UUID of the **BOT** message to soft-delete
|
|
319
|
+
|
|
320
|
+
**Return Type:** `Dict[str, Any]` (success: `success`, `message`, `timestamp`; errors: `error`, `message`, `status`, `timestamp`)
|
|
321
|
+
|
|
314
322
|
### Users API
|
|
315
323
|
|
|
316
324
|
#### `await users.create(username, email, metadata=None)`
|
|
@@ -381,7 +389,7 @@ Get all feedback submissions for a specific BOT message (most recent first).
|
|
|
381
389
|
**Return Type:** `List[FeedbackDTO]`
|
|
382
390
|
|
|
383
391
|
#### `await analytics.get_dashboard()`
|
|
384
|
-
Get project dashboard metrics.
|
|
392
|
+
Get project dashboard metrics (includes cache analytics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
385
393
|
|
|
386
394
|
**Return Type:** `DashboardMetricsDTO`
|
|
387
395
|
|
|
@@ -402,12 +410,12 @@ Get most active users.
|
|
|
402
410
|
**Return Type:** `List[TopUserDTO]`
|
|
403
411
|
|
|
404
412
|
#### `await analytics.get_user_analytics()`
|
|
405
|
-
Get analytics for all users.
|
|
413
|
+
Get analytics for all users (per-user cache metrics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
406
414
|
|
|
407
415
|
**Return Type:** `List[UserAnalyticsDTO]`
|
|
408
416
|
|
|
409
417
|
#### `await analytics.get_project_data(top_limit=10)`
|
|
410
|
-
Get project-level analytics data.
|
|
418
|
+
Get project-level analytics data (includes `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
411
419
|
|
|
412
420
|
**Parameters:**
|
|
413
421
|
- `top_limit` (int, **optional**): Limit for top results (default: 10, max: 100)
|
|
@@ -282,6 +282,14 @@ Get all messages sent by a specific agent.
|
|
|
282
282
|
|
|
283
283
|
**Return Type:** `List[PlatformMessage]`
|
|
284
284
|
|
|
285
|
+
#### `await messages.delete_message(message_id)`
|
|
286
|
+
delete a message turn (bot message and its paired human message). Idempotent if already deleted.
|
|
287
|
+
|
|
288
|
+
**Parameters:**
|
|
289
|
+
- `message_id` (UUID, required): UUID of the **BOT** message to soft-delete
|
|
290
|
+
|
|
291
|
+
**Return Type:** `Dict[str, Any]` (success: `success`, `message`, `timestamp`; errors: `error`, `message`, `status`, `timestamp`)
|
|
292
|
+
|
|
285
293
|
### Users API
|
|
286
294
|
|
|
287
295
|
#### `await users.create(username, email, metadata=None)`
|
|
@@ -352,7 +360,7 @@ Get all feedback submissions for a specific BOT message (most recent first).
|
|
|
352
360
|
**Return Type:** `List[FeedbackDTO]`
|
|
353
361
|
|
|
354
362
|
#### `await analytics.get_dashboard()`
|
|
355
|
-
Get project dashboard metrics.
|
|
363
|
+
Get project dashboard metrics (includes cache analytics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
356
364
|
|
|
357
365
|
**Return Type:** `DashboardMetricsDTO`
|
|
358
366
|
|
|
@@ -373,12 +381,12 @@ Get most active users.
|
|
|
373
381
|
**Return Type:** `List[TopUserDTO]`
|
|
374
382
|
|
|
375
383
|
#### `await analytics.get_user_analytics()`
|
|
376
|
-
Get analytics for all users.
|
|
384
|
+
Get analytics for all users (per-user cache metrics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
377
385
|
|
|
378
386
|
**Return Type:** `List[UserAnalyticsDTO]`
|
|
379
387
|
|
|
380
388
|
#### `await analytics.get_project_data(top_limit=10)`
|
|
381
|
-
Get project-level analytics data.
|
|
389
|
+
Get project-level analytics data (includes `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
382
390
|
|
|
383
391
|
**Parameters:**
|
|
384
392
|
- `top_limit` (int, **optional**): Limit for top results (default: 10, max: 100)
|
|
@@ -11,6 +11,7 @@ from ..models import (
|
|
|
11
11
|
PlatformMessageSubmissionResponse,
|
|
12
12
|
PlatformMessage,
|
|
13
13
|
AgentData,
|
|
14
|
+
DeleteMessageRequest,
|
|
14
15
|
)
|
|
15
16
|
|
|
16
17
|
|
|
@@ -291,3 +292,23 @@ class MessagesApi:
|
|
|
291
292
|
PlatformMessage
|
|
292
293
|
)
|
|
293
294
|
|
|
295
|
+
async def delete_message(self, message_id: UUID) -> Dict[str, Any]:
|
|
296
|
+
"""
|
|
297
|
+
Soft-delete a message turn (bot message and its paired human message).
|
|
298
|
+
|
|
299
|
+
POST /api/platform/messages/delete
|
|
300
|
+
|
|
301
|
+
Idempotent if the message is already deleted. Returns a map with
|
|
302
|
+
success, message, timestamp (or error fields on failure).
|
|
303
|
+
|
|
304
|
+
Args:
|
|
305
|
+
message_id: UUID of the BOT message to soft-delete (required)
|
|
306
|
+
|
|
307
|
+
Returns:
|
|
308
|
+
Dict with success, message, timestamp (or error, message, status, timestamp on error)
|
|
309
|
+
"""
|
|
310
|
+
self._http_client.ensure_authenticated()
|
|
311
|
+
if message_id is None:
|
|
312
|
+
raise ValueError("message_id is required")
|
|
313
|
+
request = DeleteMessageRequest(messageId=message_id)
|
|
314
|
+
return await self._http_client.post_map("/api/platform/messages/delete", request)
|
|
@@ -182,6 +182,12 @@ class FeedbackDTO:
|
|
|
182
182
|
submittedAt: Optional[str] = None # ISO 8601 datetime string
|
|
183
183
|
|
|
184
184
|
|
|
185
|
+
@dataclass
|
|
186
|
+
class DeleteMessageRequest:
|
|
187
|
+
"""Request for soft-deleting a message turn (bot message and its paired human)."""
|
|
188
|
+
messageId: UUID # required – bot message ID
|
|
189
|
+
|
|
190
|
+
|
|
185
191
|
@dataclass(init=False)
|
|
186
192
|
class PlatformMessage:
|
|
187
193
|
"""Platform message model - matches backend JPA entity."""
|
|
@@ -254,6 +260,9 @@ class DashboardMetricsDTO:
|
|
|
254
260
|
likes: Optional[int] = None
|
|
255
261
|
dislikes: Optional[int] = None
|
|
256
262
|
regenerates: Optional[int] = None
|
|
263
|
+
cacheServed: Optional[int] = None
|
|
264
|
+
estimatedTokensSaved: Optional[int] = None
|
|
265
|
+
estimatedCostSaved: Optional[float] = None
|
|
257
266
|
|
|
258
267
|
|
|
259
268
|
@dataclass
|
|
@@ -289,6 +298,9 @@ class UserAnalyticsDTO:
|
|
|
289
298
|
likes: Optional[int] = None
|
|
290
299
|
dislikes: Optional[int] = None
|
|
291
300
|
regenerates: Optional[int] = None
|
|
301
|
+
cacheServed: Optional[int] = None
|
|
302
|
+
estimatedTokensSaved: Optional[int] = None
|
|
303
|
+
estimatedCostSaved: Optional[float] = None
|
|
292
304
|
|
|
293
305
|
|
|
294
306
|
@dataclass
|
|
@@ -303,6 +315,9 @@ class ProjectAnalyticsResponseDTO:
|
|
|
303
315
|
likes: Optional[int] = None
|
|
304
316
|
dislikes: Optional[int] = None
|
|
305
317
|
regenerates: Optional[int] = None
|
|
318
|
+
cacheServed: Optional[int] = None
|
|
319
|
+
estimatedTokensSaved: Optional[int] = None
|
|
320
|
+
estimatedCostSaved: Optional[float] = None
|
|
306
321
|
topUserActivity: Optional[List[Any]] = None
|
|
307
322
|
topDevicesByUsage: Optional[List[Any]] = None
|
|
308
323
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shiftaiagenticinfra-sdk-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.8
|
|
4
4
|
Summary: Shiftai Agentic Infra Python SDK
|
|
5
5
|
Author: ShiftAI
|
|
6
6
|
Author-email: ShiftAI <s.tadakamalla@theshiftai.in>
|
|
@@ -311,6 +311,14 @@ Get all messages sent by a specific agent.
|
|
|
311
311
|
|
|
312
312
|
**Return Type:** `List[PlatformMessage]`
|
|
313
313
|
|
|
314
|
+
#### `await messages.delete_message(message_id)`
|
|
315
|
+
delete a message turn (bot message and its paired human message). Idempotent if already deleted.
|
|
316
|
+
|
|
317
|
+
**Parameters:**
|
|
318
|
+
- `message_id` (UUID, required): UUID of the **BOT** message to soft-delete
|
|
319
|
+
|
|
320
|
+
**Return Type:** `Dict[str, Any]` (success: `success`, `message`, `timestamp`; errors: `error`, `message`, `status`, `timestamp`)
|
|
321
|
+
|
|
314
322
|
### Users API
|
|
315
323
|
|
|
316
324
|
#### `await users.create(username, email, metadata=None)`
|
|
@@ -381,7 +389,7 @@ Get all feedback submissions for a specific BOT message (most recent first).
|
|
|
381
389
|
**Return Type:** `List[FeedbackDTO]`
|
|
382
390
|
|
|
383
391
|
#### `await analytics.get_dashboard()`
|
|
384
|
-
Get project dashboard metrics.
|
|
392
|
+
Get project dashboard metrics (includes cache analytics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
385
393
|
|
|
386
394
|
**Return Type:** `DashboardMetricsDTO`
|
|
387
395
|
|
|
@@ -402,12 +410,12 @@ Get most active users.
|
|
|
402
410
|
**Return Type:** `List[TopUserDTO]`
|
|
403
411
|
|
|
404
412
|
#### `await analytics.get_user_analytics()`
|
|
405
|
-
Get analytics for all users.
|
|
413
|
+
Get analytics for all users (per-user cache metrics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
406
414
|
|
|
407
415
|
**Return Type:** `List[UserAnalyticsDTO]`
|
|
408
416
|
|
|
409
417
|
#### `await analytics.get_project_data(top_limit=10)`
|
|
410
|
-
Get project-level analytics data.
|
|
418
|
+
Get project-level analytics data (includes `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
411
419
|
|
|
412
420
|
**Parameters:**
|
|
413
421
|
- `top_limit` (int, **optional**): Limit for top results (default: 10, max: 100)
|
|
File without changes
|
|
File without changes
|
{shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/__init__.py
RENAMED
|
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
|
|
File without changes
|
{shiftaiagenticinfra_sdk_python-0.0.7 → shiftaiagenticinfra_sdk_python-0.0.8}/shiftai/client.py
RENAMED
|
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
|