diff --git a/pyproject.toml b/pyproject.toml index 17d6649..698ce61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "superagent-py" -version = "v0.1.16" +version = "v0.1.17" description = "" readme = "README.md" authors = [] diff --git a/src/superagent/core/client_wrapper.py b/src/superagent/core/client_wrapper.py index 325cee4..3c9d63a 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.16", + "X-Fern-SDK-Version": "v0.1.17", } 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 366d5a1..1f4ab95 100644 --- a/src/superagent/resources/agent/client.py +++ b/src/superagent/resources/agent/client.py @@ -142,7 +142,13 @@ def delete(self, agent_id: str) -> typing.Any: raise ApiError(status_code=_response.status_code, body=_response_json) def invoke( - self, agent_id: str, *, input: str, session_id: typing.Optional[str] = OMIT, enable_streaming: bool + self, + agent_id: str, + *, + input: str, + session_id: typing.Optional[str] = OMIT, + enable_streaming: bool, + output_schema: typing.Optional[str] = OMIT, ) -> AppModelsResponseAgentInvoke: """ Invoke an agent @@ -155,10 +161,14 @@ def invoke( - session_id: typing.Optional[str]. - enable_streaming: bool. + + - output_schema: typing.Optional[str]. """ _request: typing.Dict[str, typing.Any] = {"input": input, "enableStreaming": enable_streaming} if session_id is not OMIT: _request["sessionId"] = session_id + if output_schema is not OMIT: + _request["outputSchema"] = output_schema _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/agents/{agent_id}/invoke"), @@ -522,7 +532,13 @@ async def delete(self, agent_id: str) -> typing.Any: raise ApiError(status_code=_response.status_code, body=_response_json) async def invoke( - self, agent_id: str, *, input: str, session_id: typing.Optional[str] = OMIT, enable_streaming: bool + self, + agent_id: str, + *, + input: str, + session_id: typing.Optional[str] = OMIT, + enable_streaming: bool, + output_schema: typing.Optional[str] = OMIT, ) -> AppModelsResponseAgentInvoke: """ Invoke an agent @@ -535,10 +551,14 @@ async def invoke( - session_id: typing.Optional[str]. - enable_streaming: bool. + + - output_schema: typing.Optional[str]. """ _request: typing.Dict[str, typing.Any] = {"input": input, "enableStreaming": enable_streaming} if session_id is not OMIT: _request["sessionId"] = session_id + if output_schema is not OMIT: + _request["outputSchema"] = output_schema _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/agents/{agent_id}/invoke"),