diff --git a/pyproject.toml b/pyproject.toml index 9bf6ff4..b05b9fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "superagent-py" -version = "v0.1.74" +version = "v0.2.0" description = "" readme = "README.md" authors = [] diff --git a/src/superagent/core/client_wrapper.py b/src/superagent/core/client_wrapper.py index 6424df1..5699051 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.74", + "X-Fern-SDK-Version": "v0.2.0", } 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 d48ab3a..1ad3c9a 100644 --- a/src/superagent/resources/agent/client.py +++ b/src/superagent/resources/agent/client.py @@ -69,7 +69,7 @@ def create( 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, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ) -> AppModelsResponseAgent: """ Create a new agent @@ -93,7 +93,7 @@ def create( - avatar: typing.Optional[str]. - - openai_options: typing.Optional[typing.Dict[str, typing.Any]]. + - metadata: typing.Optional[typing.Dict[str, typing.Any]]. """ _request: typing.Dict[str, typing.Any] = {"name": name} if is_active is not OMIT: @@ -112,8 +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 + if metadata is not OMIT: + _request["metadata"] = metadata _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/agents"), @@ -189,7 +189,7 @@ def update( 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, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ) -> AppModelsResponseAgent: """ Patch an agent @@ -213,7 +213,7 @@ def update( - type: typing.Optional[str]. - - openai_options: typing.Optional[typing.Dict[str, typing.Any]]. + - metadata: typing.Optional[typing.Dict[str, typing.Any]]. """ _request: typing.Dict[str, typing.Any] = {} if is_active is not OMIT: @@ -232,8 +232,8 @@ def update( _request["avatar"] = avatar if type is not OMIT: _request["type"] = type - if openai_options is not OMIT: - _request["openaiOptions"] = openai_options + if metadata is not OMIT: + _request["metadata"] = metadata _response = self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/agents/{agent_id}"), @@ -547,7 +547,7 @@ async def create( 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, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ) -> AppModelsResponseAgent: """ Create a new agent @@ -571,7 +571,7 @@ async def create( - avatar: typing.Optional[str]. - - openai_options: typing.Optional[typing.Dict[str, typing.Any]]. + - metadata: typing.Optional[typing.Dict[str, typing.Any]]. """ _request: typing.Dict[str, typing.Any] = {"name": name} if is_active is not OMIT: @@ -590,8 +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 + if metadata is not OMIT: + _request["metadata"] = metadata _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/agents"), @@ -667,7 +667,7 @@ async def update( 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, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ) -> AppModelsResponseAgent: """ Patch an agent @@ -691,7 +691,7 @@ async def update( - type: typing.Optional[str]. - - openai_options: typing.Optional[typing.Dict[str, typing.Any]]. + - metadata: typing.Optional[typing.Dict[str, typing.Any]]. """ _request: typing.Dict[str, typing.Any] = {} if is_active is not OMIT: @@ -710,8 +710,8 @@ async def update( _request["avatar"] = avatar if type is not OMIT: _request["type"] = type - if openai_options is not OMIT: - _request["openaiOptions"] = openai_options + if metadata is not OMIT: + _request["metadata"] = metadata _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 a56346b..84d6117 100644 --- a/src/superagent/types/prisma_models_agent.py +++ b/src/superagent/types/prisma_models_agent.py @@ -37,7 +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") + metadata: typing.Optional[typing.Any] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}