diff --git a/pyproject.toml b/pyproject.toml index a34c751..731dc1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "superagent-py" -version = "v0.1.72" +version = "v0.1.73" description = "" readme = "README.md" authors = [] diff --git a/src/superagent/__init__.py b/src/superagent/__init__.py index 27cf579..36e9346 100644 --- a/src/superagent/__init__.py +++ b/src/superagent/__init__.py @@ -5,6 +5,7 @@ AgentList, AgentRunList, AgentToolList, + AgentType, AppModelsRequestDatasource, AppModelsRequestLlm, AppModelsRequestTool, @@ -58,6 +59,7 @@ "AgentList", "AgentRunList", "AgentToolList", + "AgentType", "AppModelsRequestDatasource", "AppModelsRequestLlm", "AppModelsRequestTool", diff --git a/src/superagent/core/client_wrapper.py b/src/superagent/core/client_wrapper.py index 0d37db3..56ba546 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.72", + "X-Fern-SDK-Version": "v0.1.73", } token = self._get_token() if token is not None: diff --git a/src/superagent/types/__init__.py b/src/superagent/types/__init__.py index 0bad6d8..9d65f46 100644 --- a/src/superagent/types/__init__.py +++ b/src/superagent/types/__init__.py @@ -4,6 +4,7 @@ from .agent_list import AgentList from .agent_run_list import AgentRunList from .agent_tool_list import AgentToolList +from .agent_type import AgentType from .app_models_request_datasource import AppModelsRequestDatasource from .app_models_request_llm import AppModelsRequestLlm from .app_models_request_tool import AppModelsRequestTool @@ -53,6 +54,7 @@ "AgentList", "AgentRunList", "AgentToolList", + "AgentType", "AppModelsRequestDatasource", "AppModelsRequestLlm", "AppModelsRequestTool", diff --git a/src/superagent/types/agent_type.py b/src/superagent/types/agent_type.py new file mode 100644 index 0000000..2e22a29 --- /dev/null +++ b/src/superagent/types/agent_type.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class AgentType(str, enum.Enum): + """ + An enumeration. + """ + + SUPERAGENT = "SUPERAGENT" + OPENAI_ASSISTANT = "OPENAI_ASSISTANT" + + def visit( + self, superagent: typing.Callable[[], T_Result], openai_assistant: typing.Callable[[], T_Result] + ) -> T_Result: + if self is AgentType.SUPERAGENT: + return superagent() + if self is AgentType.OPENAI_ASSISTANT: + return openai_assistant() diff --git a/src/superagent/types/prisma_models_agent.py b/src/superagent/types/prisma_models_agent.py index 0542a8e..d11f3ff 100644 --- a/src/superagent/types/prisma_models_agent.py +++ b/src/superagent/types/prisma_models_agent.py @@ -6,6 +6,7 @@ import typing from ..core.datetime_utils import serialize_datetime +from .agent_type import AgentType from .llm_model import LlmModel try: @@ -20,6 +21,7 @@ class PrismaModelsAgent(pydantic.BaseModel): """ id: str + type: AgentType name: str avatar: typing.Optional[str] initial_message: typing.Optional[str] = pydantic.Field(alias="initialMessage")