From 49e8cc69612d8a2689d484e929b96562ce7bea9c Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 20:47:09 +0000 Subject: [PATCH] Release v0.1.74 --- poetry.lock | 6 ++-- pyproject.toml | 2 +- src/superagent/core/client_wrapper.py | 2 +- src/superagent/resources/agent/client.py | 40 +++++++++++++++++++++ src/superagent/types/prisma_models_agent.py | 1 + 5 files changed, 46 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4145c40..c23d386 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (<0.22)"] [[package]] name = "certifi" -version = "2023.11.17" +version = "2024.2.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2023.11.17-py3-none-any.whl", hash = "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474"}, - {file = "certifi-2023.11.17.tar.gz", hash = "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1"}, + {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, + {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 731dc1f..9bf6ff4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "superagent-py" -version = "v0.1.73" +version = "v0.1.74" description = "" readme = "README.md" authors = [] diff --git a/src/superagent/core/client_wrapper.py b/src/superagent/core/client_wrapper.py index 56ba546..6424df1 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.73", + "X-Fern-SDK-Version": "v0.1.74", } 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 7ec955f..d48ab3a 100644 --- a/src/superagent/resources/agent/client.py +++ b/src/superagent/resources/agent/client.py @@ -62,12 +62,14 @@ def create( *, is_active: typing.Optional[bool] = OMIT, name: str, + type: typing.Optional[str] = OMIT, initial_message: typing.Optional[str] = OMIT, prompt: typing.Optional[str] = OMIT, llm_model: typing.Optional[str] = OMIT, llm_provider: typing.Optional[LlmProvider] = OMIT, description: typing.Optional[str] = OMIT, avatar: typing.Optional[str] = OMIT, + openai_options: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ) -> AppModelsResponseAgent: """ Create a new agent @@ -77,6 +79,8 @@ def create( - name: str. + - type: typing.Optional[str]. + - initial_message: typing.Optional[str]. - prompt: typing.Optional[str]. @@ -88,10 +92,14 @@ def create( - description: typing.Optional[str]. - avatar: typing.Optional[str]. + + - openai_options: typing.Optional[typing.Dict[str, typing.Any]]. """ _request: typing.Dict[str, typing.Any] = {"name": name} if is_active is not OMIT: _request["isActive"] = is_active + if type is not OMIT: + _request["type"] = type if initial_message is not OMIT: _request["initialMessage"] = initial_message if prompt is not OMIT: @@ -104,6 +112,8 @@ def create( _request["description"] = description if avatar is not OMIT: _request["avatar"] = avatar + if openai_options is not OMIT: + _request["openaiOptions"] = openai_options _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/agents"), @@ -178,6 +188,8 @@ def update( llm_model: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, avatar: typing.Optional[str] = OMIT, + type: typing.Optional[str] = OMIT, + openai_options: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ) -> AppModelsResponseAgent: """ Patch an agent @@ -198,6 +210,10 @@ def update( - description: typing.Optional[str]. - avatar: typing.Optional[str]. + + - type: typing.Optional[str]. + + - openai_options: typing.Optional[typing.Dict[str, typing.Any]]. """ _request: typing.Dict[str, typing.Any] = {} if is_active is not OMIT: @@ -214,6 +230,10 @@ def update( _request["description"] = description if avatar is not OMIT: _request["avatar"] = avatar + if type is not OMIT: + _request["type"] = type + if openai_options is not OMIT: + _request["openaiOptions"] = openai_options _response = self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/agents/{agent_id}"), @@ -520,12 +540,14 @@ async def create( *, is_active: typing.Optional[bool] = OMIT, name: str, + type: typing.Optional[str] = OMIT, initial_message: typing.Optional[str] = OMIT, prompt: typing.Optional[str] = OMIT, llm_model: typing.Optional[str] = OMIT, llm_provider: typing.Optional[LlmProvider] = OMIT, description: typing.Optional[str] = OMIT, avatar: typing.Optional[str] = OMIT, + openai_options: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ) -> AppModelsResponseAgent: """ Create a new agent @@ -535,6 +557,8 @@ async def create( - name: str. + - type: typing.Optional[str]. + - initial_message: typing.Optional[str]. - prompt: typing.Optional[str]. @@ -546,10 +570,14 @@ async def create( - description: typing.Optional[str]. - avatar: typing.Optional[str]. + + - openai_options: typing.Optional[typing.Dict[str, typing.Any]]. """ _request: typing.Dict[str, typing.Any] = {"name": name} if is_active is not OMIT: _request["isActive"] = is_active + if type is not OMIT: + _request["type"] = type if initial_message is not OMIT: _request["initialMessage"] = initial_message if prompt is not OMIT: @@ -562,6 +590,8 @@ async def create( _request["description"] = description if avatar is not OMIT: _request["avatar"] = avatar + if openai_options is not OMIT: + _request["openaiOptions"] = openai_options _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/agents"), @@ -636,6 +666,8 @@ async def update( llm_model: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, avatar: typing.Optional[str] = OMIT, + type: typing.Optional[str] = OMIT, + openai_options: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ) -> AppModelsResponseAgent: """ Patch an agent @@ -656,6 +688,10 @@ async def update( - description: typing.Optional[str]. - avatar: typing.Optional[str]. + + - type: typing.Optional[str]. + + - openai_options: typing.Optional[typing.Dict[str, typing.Any]]. """ _request: typing.Dict[str, typing.Any] = {} if is_active is not OMIT: @@ -672,6 +708,10 @@ async def update( _request["description"] = description if avatar is not OMIT: _request["avatar"] = avatar + if type is not OMIT: + _request["type"] = type + if openai_options is not OMIT: + _request["openaiOptions"] = openai_options _response = await self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/agents/{agent_id}"), diff --git a/src/superagent/types/prisma_models_agent.py b/src/superagent/types/prisma_models_agent.py index d11f3ff..a56346b 100644 --- a/src/superagent/types/prisma_models_agent.py +++ b/src/superagent/types/prisma_models_agent.py @@ -37,6 +37,7 @@ class PrismaModelsAgent(pydantic.BaseModel): datasources: typing.Optional[typing.List[PrismaModelsAgentDatasource]] tools: typing.Optional[typing.List[PrismaModelsAgentTool]] workflow_steps: typing.Optional[typing.List[PrismaModelsWorkflowStep]] = pydantic.Field(alias="workflowSteps") + openai_metadata: typing.Optional[typing.Any] = pydantic.Field(alias="openaiMetadata") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}