diff --git a/pyproject.toml b/pyproject.toml index c636591..8ab3a48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "superagent-py" -version = "v0.1.48" +version = "v0.1.49" description = "" readme = "README.md" authors = [] diff --git a/src/superagent/core/client_wrapper.py b/src/superagent/core/client_wrapper.py index e1e0e35..d2e12e1 100644 --- a/src/superagent/core/client_wrapper.py +++ b/src/superagent/core/client_wrapper.py @@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "superagent-py", - "X-Fern-SDK-Version": "v0.1.48", + "X-Fern-SDK-Version": "v0.1.49", } token = self._get_token() if token is not None: diff --git a/src/superagent/resources/agent/client.py b/src/superagent/resources/agent/client.py index 11638c4..68e4788 100644 --- a/src/superagent/resources/agent/client.py +++ b/src/superagent/resources/agent/client.py @@ -31,19 +31,19 @@ class AgentClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def list(self, *, skip: typing.Optional[int] = None, limit: typing.Optional[int] = None) -> AgentList: + def list(self, *, skip: typing.Optional[int] = None, take: typing.Optional[int] = None) -> AgentList: """ List all agents Parameters: - skip: typing.Optional[int]. - - limit: typing.Optional[int]. + - take: typing.Optional[int]. """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/agents"), - params=remove_none_from_dict({"skip": skip, "limit": limit}), + params=remove_none_from_dict({"skip": skip, "take": take}), headers=self._client_wrapper.get_headers(), timeout=60, ) @@ -429,19 +429,19 @@ class AsyncAgentClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def list(self, *, skip: typing.Optional[int] = None, limit: typing.Optional[int] = None) -> AgentList: + async def list(self, *, skip: typing.Optional[int] = None, take: typing.Optional[int] = None) -> AgentList: """ List all agents Parameters: - skip: typing.Optional[int]. - - limit: typing.Optional[int]. + - take: typing.Optional[int]. """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/agents"), - params=remove_none_from_dict({"skip": skip, "limit": limit}), + params=remove_none_from_dict({"skip": skip, "take": take}), headers=self._client_wrapper.get_headers(), timeout=60, ) diff --git a/src/superagent/resources/workflow/client.py b/src/superagent/resources/workflow/client.py index 0367541..387ac75 100644 --- a/src/superagent/resources/workflow/client.py +++ b/src/superagent/resources/workflow/client.py @@ -30,19 +30,19 @@ class WorkflowClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def list(self, *, skip: typing.Optional[int] = None, limit: typing.Optional[int] = None) -> WorkflowList: + def list(self, *, skip: typing.Optional[int] = None, take: typing.Optional[int] = None) -> WorkflowList: """ List all workflows Parameters: - skip: typing.Optional[int]. - - limit: typing.Optional[int]. + - take: typing.Optional[int]. """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/workflows"), - params=remove_none_from_dict({"skip": skip, "limit": limit}), + params=remove_none_from_dict({"skip": skip, "take": take}), headers=self._client_wrapper.get_headers(), timeout=60, ) @@ -274,19 +274,19 @@ class AsyncWorkflowClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def list(self, *, skip: typing.Optional[int] = None, limit: typing.Optional[int] = None) -> WorkflowList: + async def list(self, *, skip: typing.Optional[int] = None, take: typing.Optional[int] = None) -> WorkflowList: """ List all workflows Parameters: - skip: typing.Optional[int]. - - limit: typing.Optional[int]. + - take: typing.Optional[int]. """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/workflows"), - params=remove_none_from_dict({"skip": skip, "limit": limit}), + params=remove_none_from_dict({"skip": skip, "take": take}), headers=self._client_wrapper.get_headers(), timeout=60, ) diff --git a/src/superagent/types/agent_list.py b/src/superagent/types/agent_list.py index c98045f..56ca7aa 100644 --- a/src/superagent/types/agent_list.py +++ b/src/superagent/types/agent_list.py @@ -15,6 +15,7 @@ class AgentList(pydantic.BaseModel): success: bool data: typing.Optional[typing.List[PrismaModelsAgent]] + total_pages: int def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/superagent/types/tool_type.py b/src/superagent/types/tool_type.py index 5d2c5ce..80acb78 100644 --- a/src/superagent/types/tool_type.py +++ b/src/superagent/types/tool_type.py @@ -28,6 +28,7 @@ class ToolType(str, enum.Enum): TTS_1 = "TTS_1" HAND_OFF = "HAND_OFF" FUNCTION = "FUNCTION" + HTTP = "HTTP" def visit( self, @@ -48,6 +49,7 @@ def visit( tts_1: typing.Callable[[], T_Result], hand_off: typing.Callable[[], T_Result], function: typing.Callable[[], T_Result], + http: typing.Callable[[], T_Result], ) -> T_Result: if self is ToolType.ALGOLIA: return algolia() @@ -83,3 +85,5 @@ def visit( return hand_off() if self is ToolType.FUNCTION: return function() + if self is ToolType.HTTP: + return http() diff --git a/src/superagent/types/workflow_list.py b/src/superagent/types/workflow_list.py index 8869465..f664013 100644 --- a/src/superagent/types/workflow_list.py +++ b/src/superagent/types/workflow_list.py @@ -15,6 +15,7 @@ class WorkflowList(pydantic.BaseModel): success: bool data: typing.Optional[typing.List[PrismaModelsWorkflow]] + total_pages: int def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}