shiftaiagenticinfra-sdk-python 0.0.9__tar.gz → 0.0.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.
- {shiftaiagenticinfra_sdk_python-0.0.9/shiftaiagenticinfra_sdk_python.egg-info → shiftaiagenticinfra_sdk_python-0.0.11}/PKG-INFO +60 -15
- shiftaiagenticinfra_sdk_python-0.0.9/PKG-INFO → shiftaiagenticinfra_sdk_python-0.0.11/README.md +538 -522
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/pyproject.toml +1 -1
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/analytics_api.py +143 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/messages_api.py +22 -25
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/client.py +2 -1
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/models/__init__.py +82 -4
- shiftaiagenticinfra_sdk_python-0.0.9/README.md → shiftaiagenticinfra_sdk_python-0.0.11/shiftaiagenticinfra_sdk_python.egg-info/PKG-INFO +567 -493
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/setup.cfg +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/setup.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/__init__.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/__init__.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/agents_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/conversations_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/internal/__init__.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/internal/trulens_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/platform_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/platform_session_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/api/users_api.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/http/__init__.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/http/exceptions.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftai/http/http_client.py +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftaiagenticinfra_sdk_python.egg-info/SOURCES.txt +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftaiagenticinfra_sdk_python.egg-info/dependency_links.txt +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftaiagenticinfra_sdk_python.egg-info/requires.txt +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/shiftaiagenticinfra_sdk_python.egg-info/top_level.txt +0 -0
- {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.11}/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.11
|
|
4
4
|
Summary: Shiftai Agentic Infra Python SDK
|
|
5
5
|
Author: ShiftAI
|
|
6
6
|
Author-email: ShiftAI <s.tadakamalla@theshiftai.in>
|
|
@@ -162,9 +162,9 @@ async def main():
|
|
|
162
162
|
username="john_doe",
|
|
163
163
|
message="Hello, how can I help you?",
|
|
164
164
|
agent_name="SupportBot",
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
agent_version="1.0.0"
|
|
165
|
+
user_email="john@example.com", # Required for message submission
|
|
166
|
+
agent_platform="OpenAI", # Optional; when omitted, lookup uses name and project only
|
|
167
|
+
agent_version="1.0.0" # Optional; backend defaults to "1.0.0" when omitted
|
|
168
168
|
)
|
|
169
169
|
|
|
170
170
|
print(f"Message sent! ID: {human_response.messageId}")
|
|
@@ -174,11 +174,11 @@ async def main():
|
|
|
174
174
|
username="john_doe",
|
|
175
175
|
message="I can help you with your questions!",
|
|
176
176
|
agent_name="SupportBot",
|
|
177
|
-
agent_platform="OpenAI",
|
|
178
|
-
agent_version="1.0.0", # Required: Agent version
|
|
179
177
|
reply_message_id=human_response.messageId,
|
|
180
178
|
rag_context="Retrieved context from knowledge base...",
|
|
181
|
-
user_email="john@example.com"
|
|
179
|
+
user_email="john@example.com", # Required for message submission
|
|
180
|
+
agent_platform="OpenAI", # Optional
|
|
181
|
+
agent_version="1.0.0" # Optional; backend defaults to "1.0.0" when omitted
|
|
182
182
|
)
|
|
183
183
|
|
|
184
184
|
# 4. Get analytics
|
|
@@ -224,14 +224,14 @@ Send a human message with automatic user/agent creation.
|
|
|
224
224
|
- `username` (str, **required**): User identifier (e.g., "john_doe", "user123")
|
|
225
225
|
- `message` (str, **required**): The actual message content (e.g., "Hello, how can I help you?")
|
|
226
226
|
- `agent_name` (str, **required**): Target agent name (e.g., "SupportBot", "GPT-4")
|
|
227
|
-
- `
|
|
228
|
-
- `
|
|
227
|
+
- `user_email` (str, **required**): User's email address (required for message submission; e.g., "john@example.com")
|
|
228
|
+
- `agent_platform` (str, **optional**): Agent platform/provider (e.g., "OpenAI", "Azure"). When omitted, lookup/creation use name and project only.
|
|
229
229
|
- `user_metadata` (dict, **optional**): Custom user attributes (e.g., `{"role": "premium", "subscription": "gold"}`)
|
|
230
230
|
- `intent` (str, **optional**): Message intent classification (e.g., "question", "complaint", "request")
|
|
231
231
|
- `entities` (dict, **optional**): Extracted named entities (e.g., `{"person": "John", "location": "New York"}`)
|
|
232
232
|
- `annotations` (dict, **optional**): Additional message annotations (e.g., `{"priority": "high", "tags": ["urgent"]}`)
|
|
233
233
|
- `source_event` (dict, **optional**): Original event data from source system
|
|
234
|
-
- `agent_version` (str, **optional**): Agent version/model (e.g., "gpt-4", "claude-2")
|
|
234
|
+
- `agent_version` (str, **optional**): Agent version/model (e.g., "gpt-4", "claude-2"). Backend defaults to `"1.0.0"` when omitted.
|
|
235
235
|
- `agent_metadata` (dict, **optional**): Agent configuration data (e.g., `{"temperature": 0.7, "max_tokens": 1000}`)
|
|
236
236
|
- `mode` (str, **optional**): Mode identifier for the message. Allowed values: `"SIMPLE"` or `"EXPAND"`
|
|
237
237
|
- `conversation_id` (UUID, **optional**): Conversation ID to store the HUMAN message in. If omitted, backend creates a new conversation automatically.
|
|
@@ -245,16 +245,16 @@ Send a bot response to a human message.
|
|
|
245
245
|
- `username` (str, **required**): User identifier (must match the human message sender)
|
|
246
246
|
- `message` (str, **required**): Bot response content (e.g., "I can help you with that!")
|
|
247
247
|
- `agent_name` (str, **required**): Agent name (must match the human message agent)
|
|
248
|
-
- `agent_platform` (str, **required**): Agent platform (must match the human message platform)
|
|
249
248
|
- `reply_message_id` (UUID, **required**): ID of the human message being replied to
|
|
250
249
|
- `rag_context` (str, **required**): RAG context used for generating the response
|
|
251
|
-
- `user_email` (str, **required**): User's email address for
|
|
250
|
+
- `user_email` (str, **required**): User's email address (required for message submission)
|
|
251
|
+
- `agent_platform` (str, **optional**): Agent platform (must match the human message when provided). When omitted, lookup uses name and project only.
|
|
252
252
|
- `user_metadata` (dict, **optional**): User metadata
|
|
253
253
|
- `intent` (str, **optional**): Response intent
|
|
254
254
|
- `entities` (dict, **optional**): Extracted entities from response
|
|
255
255
|
- `annotations` (dict, **optional**): Response annotations
|
|
256
256
|
- `source_event` (dict, **optional**): Source event data
|
|
257
|
-
- `agent_version` (str, **optional**): Agent version/model
|
|
257
|
+
- `agent_version` (str, **optional**): Agent version/model. Backend defaults to `"1.0.0"` when omitted.
|
|
258
258
|
- `agent_metadata` (dict, **optional**): Agent configuration
|
|
259
259
|
- `mode` (str, **optional**): Mode identifier for the message. Allowed values: `"SIMPLE"` or `"EXPAND"`
|
|
260
260
|
|
|
@@ -286,7 +286,7 @@ POST `/api/platformsession/endconversation`
|
|
|
286
286
|
Low-level message submission with full control.
|
|
287
287
|
|
|
288
288
|
**Parameters:**
|
|
289
|
-
- `request` (PlatformMessageSubmissionRequest, **required**): Complete message request object
|
|
289
|
+
- `request` (PlatformMessageSubmissionRequest, **required**): Complete message request object. `email` is required for message submission; the SDK raises `ValueError` if it is missing or blank.
|
|
290
290
|
|
|
291
291
|
**Return Type:** `PlatformMessageSubmissionResponse`
|
|
292
292
|
|
|
@@ -388,6 +388,50 @@ Get all feedback submissions for a specific BOT message (most recent first).
|
|
|
388
388
|
|
|
389
389
|
**Return Type:** `List[FeedbackDTO]`
|
|
390
390
|
|
|
391
|
+
#### `await analytics.get_latest_feedbacks(timeperiod=None)`
|
|
392
|
+
Get latest feedback submissions for the project, most recent first.
|
|
393
|
+
|
|
394
|
+
**Parameters:**
|
|
395
|
+
- `timeperiod` (int, **optional**): None or omitted = all feedbacks; N (e.g. 24) = only feedbacks from the last N hours
|
|
396
|
+
|
|
397
|
+
**Return Type:** `LatestFeedbacksResponse` (`.feedbacks` list of `LatestFeedbackItemResponse`; optional `.message` when time window is used and there are no feedbacks)
|
|
398
|
+
|
|
399
|
+
#### User preferences (tenant-isolated; require Api-Key)
|
|
400
|
+
|
|
401
|
+
**Categories:** `USER_PERSONAL` (tone, style, formatting), `METRICS` (structure, visualization), `CALCULATION` (formulas, methods). Use value `"DELETE"` (case-insensitive) to remove the item at the given index.
|
|
402
|
+
|
|
403
|
+
#### `await analytics.update_user_preference(request)`
|
|
404
|
+
Update one user preference item (or remove with value `"DELETE"`).
|
|
405
|
+
|
|
406
|
+
**Endpoint:** POST `/api/analytics/user-preferences/update`
|
|
407
|
+
|
|
408
|
+
**Parameters:**
|
|
409
|
+
- `request` (`UserPreferenceUpdateRequest`, **required**): `profileId` (UUID), `category` (USER_PERSONAL | METRICS | CALCULATION), `index` (0-based, non-negative), `value` (new text or `"DELETE"` to remove item at index)
|
|
410
|
+
|
|
411
|
+
**Return Type:** `UserPreferenceItemResponse` (includes `updatedAt` on success)
|
|
412
|
+
|
|
413
|
+
#### `await analytics.list_user_preferences_by_email(email)`
|
|
414
|
+
List preferences for one user by email.
|
|
415
|
+
|
|
416
|
+
**Endpoint:** POST `/api/analytics/user-preferences/list`
|
|
417
|
+
|
|
418
|
+
**Parameters:**
|
|
419
|
+
- `email` (str, **required**): User email in the tenant (e.g. `"john@example.com"`)
|
|
420
|
+
|
|
421
|
+
**Return Type:** `UserPreferenceListResponse` (`.userpreferences` list of `UserPreferenceItemResponse`)
|
|
422
|
+
|
|
423
|
+
#### `await analytics.list_all_user_preferences(limit=None)`
|
|
424
|
+
List all user preferences in the tenant with optional limit.
|
|
425
|
+
|
|
426
|
+
**Endpoint:** POST `/api/analytics/user-preferences/list/all`
|
|
427
|
+
|
|
428
|
+
**Parameters:**
|
|
429
|
+
- `limit` (int, **optional**): Max profiles to return (default 50, max 500). Omit or `None` for default.
|
|
430
|
+
|
|
431
|
+
**Return Type:** `UserPreferenceListResponse` (`.userpreferences` list of `UserPreferenceItemResponse`)
|
|
432
|
+
|
|
433
|
+
**Response shape (single profile):** `UserPreferenceItemResponse` has `profileId`, `username`, `userEmail`, `botName`, `userPreferences` (object with `userPersonalFeedbacks`, `metricsFeedbacks`, `calculationFeedbacks` arrays of strings), `createdAt`, `updatedAt` (ISO-8601).
|
|
434
|
+
|
|
391
435
|
#### `await analytics.get_dashboard()`
|
|
392
436
|
Get project dashboard metrics (includes cache analytics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
|
|
393
437
|
|
|
@@ -492,7 +536,8 @@ try:
|
|
|
492
536
|
username="user",
|
|
493
537
|
message="Hello",
|
|
494
538
|
agent_name="Bot",
|
|
495
|
-
|
|
539
|
+
user_email="user@example.com", # Required for message submission
|
|
540
|
+
agent_platform="OpenAI" # Optional
|
|
496
541
|
)
|
|
497
542
|
except BadRequestException as e:
|
|
498
543
|
print(f"Invalid request: {e}")
|