assistant-runtime-sdk 1.2.0__tar.gz → 1.3.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.2.0 → assistant_runtime_sdk-1.3.0}/PKG-INFO +5 -1
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/README.md +4 -0
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/__init__.py +1 -1
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/async_client.py +8 -1
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/base.py +7 -0
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/client.py +17 -3
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/pyproject.toml +1 -1
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/LICENSE +0 -0
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/auth.py +0 -0
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/exceptions.py +0 -0
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/skills.py +0 -0
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/streaming.py +0 -0
- {assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: assistant_runtime_sdk
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Python SDK for FAC Cloud - the Assistant Runtime AI assistant backend
|
|
5
5
|
Keywords: frappe,ai,assistant,llm,mcp,anthropic,openai,streaming
|
|
6
6
|
Author: Paul Clinton
|
|
@@ -173,6 +173,10 @@ surface. A representative selection:
|
|
|
173
173
|
**Workflows** — `list_workflows()`, `create_workflow()`, `execute_workflow()`,
|
|
174
174
|
`list_workflow_runs()`, `set_workflow_schedule()`
|
|
175
175
|
|
|
176
|
+
**Support & feedback** — `create_ticket()`, `list_tickets()`, `get_ticket_thread()`,
|
|
177
|
+
`reply_to_ticket()`, `upload_ticket_attachment()`, `submit_feedback()`,
|
|
178
|
+
`list_feedback(user_id)`
|
|
179
|
+
|
|
176
180
|
**Prompts** — `list_prompts(user_id)`, `get_prompt(prompt_name, arguments=None)`
|
|
177
181
|
|
|
178
182
|
See [`docs/`](docs/) for the full reference.
|
|
@@ -140,6 +140,10 @@ surface. A representative selection:
|
|
|
140
140
|
**Workflows** — `list_workflows()`, `create_workflow()`, `execute_workflow()`,
|
|
141
141
|
`list_workflow_runs()`, `set_workflow_schedule()`
|
|
142
142
|
|
|
143
|
+
**Support & feedback** — `create_ticket()`, `list_tickets()`, `get_ticket_thread()`,
|
|
144
|
+
`reply_to_ticket()`, `upload_ticket_attachment()`, `submit_feedback()`,
|
|
145
|
+
`list_feedback(user_id)`
|
|
146
|
+
|
|
143
147
|
**Prompts** — `list_prompts(user_id)`, `get_prompt(prompt_name, arguments=None)`
|
|
144
148
|
|
|
145
149
|
See [`docs/`](docs/) for the full reference.
|
{assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/async_client.py
RENAMED
|
@@ -846,7 +846,9 @@ class AsyncAssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
846
846
|
async def remove_user_seat(self) -> Optional[Dict[str, Any]]:
|
|
847
847
|
"""Async version of AssistantRuntimeClient.remove_user_seat."""
|
|
848
848
|
endpoint, params = self._prepare_remove_user_seat()
|
|
849
|
-
return await self.
|
|
849
|
+
return await self._request_post_json(
|
|
850
|
+
endpoint, params, api_base=self.billing_api_base
|
|
851
|
+
)
|
|
850
852
|
|
|
851
853
|
async def preview_seat_charge(self) -> Optional[Dict[str, Any]]:
|
|
852
854
|
"""Async version of AssistantRuntimeClient.preview_seat_charge."""
|
|
@@ -1683,6 +1685,11 @@ class AsyncAssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
1683
1685
|
endpoint, payload = self._prepare_list_tickets(user_id, status)
|
|
1684
1686
|
return await self._request_post_json(endpoint, payload)
|
|
1685
1687
|
|
|
1688
|
+
async def list_feedback(self, user_id: str) -> Optional[Dict[str, Any]]:
|
|
1689
|
+
"""List the user's submitted feedback. Returns a list of summary dicts."""
|
|
1690
|
+
endpoint, payload = self._prepare_list_feedback(user_id)
|
|
1691
|
+
return await self._request_post_json(endpoint, payload)
|
|
1692
|
+
|
|
1686
1693
|
async def get_ticket_thread(self, user_id: str, ticket_id: str) -> Optional[Dict[str, Any]]:
|
|
1687
1694
|
"""Get a ticket's full conversation thread. Returns {ticket, messages: [...]}."""
|
|
1688
1695
|
endpoint, payload = self._prepare_get_ticket_thread(user_id, ticket_id)
|
|
@@ -1836,6 +1836,13 @@ class BaseAssistantRuntimeClient:
|
|
|
1836
1836
|
payload["environment"] = environment
|
|
1837
1837
|
return "support.submit_feedback", payload
|
|
1838
1838
|
|
|
1839
|
+
def _prepare_list_feedback(self, user_id: str) -> tuple:
|
|
1840
|
+
"""Returns (endpoint, payload)."""
|
|
1841
|
+
return "support.list_feedback", {
|
|
1842
|
+
"tenant_id": self.tenant_id,
|
|
1843
|
+
"user_id": user_id,
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1839
1846
|
def _prepare_list_tickets(self, user_id: str, status: Optional[str] = None) -> tuple:
|
|
1840
1847
|
"""Returns (endpoint, payload)."""
|
|
1841
1848
|
payload: Dict[str, Any] = {"tenant_id": self.tenant_id, "user_id": user_id}
|
|
@@ -953,7 +953,11 @@ class AssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
953
953
|
timeout: Optional request timeout in seconds.
|
|
954
954
|
|
|
955
955
|
Returns:
|
|
956
|
-
{"summary": str | None, "cached": bool, "
|
|
956
|
+
{"summary": str | None, "cached": bool, "stale": bool,
|
|
957
|
+
"reason": str | None}
|
|
958
|
+
|
|
959
|
+
``stale`` means the server handed back the previous summary and is
|
|
960
|
+
regenerating behind it — the text is servable, just not current.
|
|
957
961
|
"""
|
|
958
962
|
endpoint, params = self._prepare_get_memory_summary(user_id, force)
|
|
959
963
|
return self._request_get(endpoint, params, timeout=timeout, api_base=self.memory_api_base)
|
|
@@ -1189,9 +1193,14 @@ class AssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
1189
1193
|
return self._request_get(endpoint, params, api_base=self.billing_api_base)
|
|
1190
1194
|
|
|
1191
1195
|
def remove_user_seat(self) -> Optional[Dict[str, Any]]:
|
|
1192
|
-
"""Remove one seat. No refund; next renewal reflects lower count.
|
|
1196
|
+
"""Remove one vacant seat. No refund; next renewal reflects the lower count.
|
|
1197
|
+
|
|
1198
|
+
POST, not GET: this is a write, and Frappe rolls back any request
|
|
1199
|
+
whose method it considers safe. Over GET the subscription save was
|
|
1200
|
+
discarded while the response still said success.
|
|
1201
|
+
"""
|
|
1193
1202
|
endpoint, params = self._prepare_remove_user_seat()
|
|
1194
|
-
return self.
|
|
1203
|
+
return self._request_post_json(endpoint, params, api_base=self.billing_api_base)
|
|
1195
1204
|
|
|
1196
1205
|
def preview_seat_charge(self) -> Optional[Dict[str, Any]]:
|
|
1197
1206
|
"""Preview the prorated cost of adding one seat."""
|
|
@@ -2488,6 +2497,11 @@ class AssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
2488
2497
|
endpoint, payload = self._prepare_list_tickets(user_id, status)
|
|
2489
2498
|
return self._request_post_json(endpoint, payload)
|
|
2490
2499
|
|
|
2500
|
+
def list_feedback(self, user_id: str) -> Optional[Dict[str, Any]]:
|
|
2501
|
+
"""List the user's submitted feedback. Returns a list of summary dicts."""
|
|
2502
|
+
endpoint, payload = self._prepare_list_feedback(user_id)
|
|
2503
|
+
return self._request_post_json(endpoint, payload)
|
|
2504
|
+
|
|
2491
2505
|
def get_ticket_thread(self, user_id: str, ticket_id: str) -> Optional[Dict[str, Any]]:
|
|
2492
2506
|
"""Get a ticket's full conversation thread. Returns {ticket, messages: [...]}."""
|
|
2493
2507
|
endpoint, payload = self._prepare_get_ticket_thread(user_id, ticket_id)
|
|
File without changes
|
|
File without changes
|
{assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{assistant_runtime_sdk-1.2.0 → assistant_runtime_sdk-1.3.0}/assistant_runtime_sdk/streaming.py
RENAMED
|
File without changes
|
|
File without changes
|