assistant-runtime-sdk 1.6.0__tar.gz → 1.7.0__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.
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/PKG-INFO +1 -1
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/__init__.py +1 -1
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/async_client.py +12 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/base.py +10 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/client.py +15 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/pyproject.toml +1 -1
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/LICENSE +0 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/README.md +0 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/auth.py +0 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/exceptions.py +0 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/skills.py +0 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/streaming.py +0 -0
- {assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/types.py +0 -0
{assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/async_client.py
RENAMED
|
@@ -1737,6 +1737,18 @@ class AsyncAssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
1737
1737
|
user_id, rating, comment, category, conversation_id, environment)
|
|
1738
1738
|
return await self._request_post_json(endpoint, payload)
|
|
1739
1739
|
|
|
1740
|
+
async def download_ticket_attachment(self, user_id: str, ticket_id: str,
|
|
1741
|
+
file_url: str) -> tuple:
|
|
1742
|
+
"""Download one attachment from a ticket the user owns.
|
|
1743
|
+
|
|
1744
|
+
Returns:
|
|
1745
|
+
(content_bytes, content_type, filename) tuple.
|
|
1746
|
+
"""
|
|
1747
|
+
endpoint, params = self._prepare_download_ticket_attachment(
|
|
1748
|
+
user_id, ticket_id, file_url
|
|
1749
|
+
)
|
|
1750
|
+
return await self._request_get_raw(endpoint, params)
|
|
1751
|
+
|
|
1740
1752
|
async def list_tickets(self, user_id: str, status: Optional[str] = None) -> Optional[Dict[str, Any]]:
|
|
1741
1753
|
"""List the user's support tickets. Returns {tickets: [...]}."""
|
|
1742
1754
|
endpoint, payload = self._prepare_list_tickets(user_id, status)
|
|
@@ -1924,6 +1924,16 @@ class BaseAssistantRuntimeClient:
|
|
|
1924
1924
|
"ticket_id": ticket_id,
|
|
1925
1925
|
}
|
|
1926
1926
|
|
|
1927
|
+
def _prepare_download_ticket_attachment(self, user_id: str, ticket_id: str,
|
|
1928
|
+
file_url: str) -> tuple:
|
|
1929
|
+
"""Returns (endpoint, params)."""
|
|
1930
|
+
return "support.download_ticket_attachment", {
|
|
1931
|
+
"tenant_id": self.tenant_id,
|
|
1932
|
+
"user_id": user_id,
|
|
1933
|
+
"ticket_id": ticket_id,
|
|
1934
|
+
"file_url": file_url,
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1927
1937
|
def _prepare_reply_to_ticket(self, user_id: str, ticket_id: str, message: str,
|
|
1928
1938
|
attachment_ids: Optional[List[str]] = None) -> tuple:
|
|
1929
1939
|
"""Returns (endpoint, payload)."""
|
|
@@ -2593,6 +2593,21 @@ class AssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
2593
2593
|
user_id, rating, comment, category, conversation_id, environment)
|
|
2594
2594
|
return self._request_post_json(endpoint, payload)
|
|
2595
2595
|
|
|
2596
|
+
def download_ticket_attachment(self, user_id: str, ticket_id: str,
|
|
2597
|
+
file_url: str) -> tuple:
|
|
2598
|
+
"""Download one attachment from a ticket the user owns.
|
|
2599
|
+
|
|
2600
|
+
Raw bytes rather than JSON, so a 10 MB screenshot doesn't get
|
|
2601
|
+
base64-inflated through two hops.
|
|
2602
|
+
|
|
2603
|
+
Returns:
|
|
2604
|
+
(content_bytes, content_type, filename) tuple.
|
|
2605
|
+
"""
|
|
2606
|
+
endpoint, params = self._prepare_download_ticket_attachment(
|
|
2607
|
+
user_id, ticket_id, file_url
|
|
2608
|
+
)
|
|
2609
|
+
return self._request_get_raw(endpoint, params)
|
|
2610
|
+
|
|
2596
2611
|
def list_tickets(self, user_id: str, status: Optional[str] = None) -> Optional[Dict[str, Any]]:
|
|
2597
2612
|
"""List the user's support tickets. Returns {tickets: [...]}."""
|
|
2598
2613
|
endpoint, payload = self._prepare_list_tickets(user_id, status)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{assistant_runtime_sdk-1.6.0 → assistant_runtime_sdk-1.7.0}/assistant_runtime_sdk/streaming.py
RENAMED
|
File without changes
|
|
File without changes
|