persona-sdk-python 0.1.0__tar.gz → 0.1.2__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.
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/.gitignore +1 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/PKG-INFO +1 -1
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/__init__.py +2 -2
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/projects.py +15 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/client.py +2 -1
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/pyproject.toml +1 -1
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/README.md +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/__init__.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/agents.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/credentials.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/features.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/knowledge_bases.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/missions.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/service_prices.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/sessions.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/triggers.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/api/workflows.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/runners/__init__.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/runners/agent_runner.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/runners/resource_retriever.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/runners/tool_invoker.py +0 -0
- {persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/uv.lock +0 -0
|
@@ -12,8 +12,8 @@ from persona_sdk.api.service_prices import ServicePricesApi
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class PersonaSdk:
|
|
15
|
-
def __init__(self, base_url: str, api_key: str, workflows_url: str = None):
|
|
16
|
-
self.client = PersonaClient(base_url, api_key)
|
|
15
|
+
def __init__(self, base_url: str, api_key: str, proxy: str = None, workflows_url: str = None):
|
|
16
|
+
self.client = PersonaClient(base_url, api_key, proxy=proxy)
|
|
17
17
|
self.workflows_client = PersonaClient(workflows_url, api_key) if workflows_url else self.client
|
|
18
18
|
self.agents = AgentsApi(self.client)
|
|
19
19
|
self.workflows = WorkflowsApi(self.workflows_client)
|
|
@@ -25,3 +25,18 @@ class ProjectsApi:
|
|
|
25
25
|
|
|
26
26
|
async def delete(self, project_id: str) -> dict:
|
|
27
27
|
return await self._client.delete(f"/projects/{project_id}")
|
|
28
|
+
|
|
29
|
+
async def get_subscription(self, project_id: str) -> dict:
|
|
30
|
+
return await self._client.get(f"/projects/{project_id}/subscription")
|
|
31
|
+
|
|
32
|
+
async def change_subscription_plan(self, project_id: str, to_plan_type: str) -> dict:
|
|
33
|
+
return await self._client.post(
|
|
34
|
+
f"/projects/{project_id}/subscription/actions/change-plan",
|
|
35
|
+
json={"toPlanType": to_plan_type},
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
async def add_subscription_credits(self, project_id: str, credits: int) -> dict:
|
|
39
|
+
return await self._client.post(
|
|
40
|
+
f"/projects/{project_id}/subscription/actions/add-credits",
|
|
41
|
+
json={"credits": credits},
|
|
42
|
+
)
|
|
@@ -12,13 +12,14 @@ class PersonaClient:
|
|
|
12
12
|
JWT tokens are automatically detected and validated by the server.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
def __init__(self, base_url: str, api_key: str):
|
|
15
|
+
def __init__(self, base_url: str, api_key: str, proxy: str = None):
|
|
16
16
|
self.base_url = base_url.rstrip("/")
|
|
17
17
|
self.api_key = api_key
|
|
18
18
|
self._client = httpx.AsyncClient(
|
|
19
19
|
base_url=self.base_url,
|
|
20
20
|
headers={"x-persona-apikey": self.api_key},
|
|
21
21
|
timeout=30.0,
|
|
22
|
+
proxy=proxy,
|
|
22
23
|
)
|
|
23
24
|
|
|
24
25
|
async def get(self, path: str, params: dict = None) -> dict:
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{persona_sdk_python-0.1.0 → persona_sdk_python-0.1.2}/persona_sdk/runners/resource_retriever.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|