Skip to content

Commit

Permalink
Release v0.1.74
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Feb 2, 2024
1 parent a73f673 commit 49e8cc6
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 5 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "superagent-py"
version = "v0.1.73"
version = "v0.1.74"
description = ""
readme = "README.md"
authors = []
Expand Down
2 changes: 1 addition & 1 deletion src/superagent/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
40 changes: 40 additions & 0 deletions src/superagent/resources/agent/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -77,6 +79,8 @@ def create(
- name: str.
- type: typing.Optional[str].
- initial_message: typing.Optional[str].
- prompt: typing.Optional[str].
Expand All @@ -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:
Expand All @@ -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"),
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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}"),
Expand Down Expand Up @@ -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
Expand All @@ -535,6 +557,8 @@ async def create(
- name: str.
- type: typing.Optional[str].
- initial_message: typing.Optional[str].
- prompt: typing.Optional[str].
Expand All @@ -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:
Expand All @@ -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"),
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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}"),
Expand Down
1 change: 1 addition & 0 deletions src/superagent/types/prisma_models_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 49e8cc6

Please sign in to comment.