From f8111eaf3e1ecf25cab76e00c090a2da28a72457 Mon Sep 17 00:00:00 2001 From: Diwank Tomer Date: Mon, 19 Aug 2024 21:09:56 -0400 Subject: [PATCH] fix(agents-api): Fix the typespec bug and regenerate Signed-off-by: Diwank Tomer --- agents-api/agents_api/autogen/Agents.py | 5 + agents-api/agents_api/autogen/Chat.py | 29 +- agents-api/agents_api/autogen/Common.py | 3 + agents-api/agents_api/autogen/Docs.py | 12 + agents-api/agents_api/autogen/Entries.py | 19 +- agents-api/agents_api/autogen/Executions.py | 8 + agents-api/agents_api/autogen/Jobs.py | 5 +- agents-api/agents_api/autogen/Sessions.py | 23 +- agents-api/agents_api/autogen/Tasks.py | 43 +- agents-api/agents_api/autogen/Tools.py | 12 + agents-api/agents_api/autogen/Users.py | 5 + agents-api/poetry.lock | 243 ++++--- agents-api/pyproject.toml | 6 +- agents-api/tests/utils.py | 3 - scripts/generate_openapi_code.sh | 3 + sdks/python/julep/api/__init__.py | 130 ++++ sdks/python/julep/api/types/__init__.py | 150 ++++- .../api/types/tasks_base_workflow_step.py | 2 +- .../julep/api/types/tasks_case_then_then.py | 607 +++++++++++++++++- .../tasks_create_task_request_main_item.py | 2 +- .../julep/api/types/tasks_foreach_do_do.py | 607 +++++++++++++++++- .../types/tasks_if_else_workflow_step_else.py | 607 +++++++++++++++++- .../types/tasks_if_else_workflow_step_then.py | 607 +++++++++++++++++- .../tasks_parallel_step_parallel_item.py | 555 +++++++++++++++- .../tasks_patch_task_request_main_item.py | 2 +- .../julep/api/types/tasks_task_main_item.py | 2 +- .../julep/api/types/tasks_tool_call_step.py | 3 +- .../tasks_update_task_request_main_item.py | 2 +- sdks/python/poetry.lock | 22 +- sdks/ts/src/api/models/Tasks_CaseThen.ts | 2 + sdks/ts/src/api/models/Tasks_ForeachDo.ts | 2 + .../api/models/Tasks_IfElseWorkflowStep.ts | 3 + sdks/ts/src/api/models/Tasks_ParallelStep.ts | 2 + sdks/ts/src/api/models/Tasks_ToolCallStep.ts | 3 +- sdks/ts/src/api/schemas/$Tasks_CaseThen.ts | 3 + sdks/ts/src/api/schemas/$Tasks_ForeachDo.ts | 3 + .../api/schemas/$Tasks_IfElseWorkflowStep.ts | 6 + .../ts/src/api/schemas/$Tasks_ParallelStep.ts | 3 + .../ts/src/api/schemas/$Tasks_ToolCallStep.ts | 2 +- typespec/package-lock.json | 114 ++-- typespec/package.json | 12 +- typespec/tasks/steps.tsp | 7 +- 42 files changed, 3540 insertions(+), 339 deletions(-) diff --git a/agents-api/agents_api/autogen/Agents.py b/agents-api/agents_api/autogen/Agents.py index b4acfb563..a20dd5392 100644 --- a/agents-api/agents_api/autogen/Agents.py +++ b/agents-api/agents_api/autogen/Agents.py @@ -13,6 +13,7 @@ class Agent(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: Annotated[UUID, Field(json_schema_extra={"readOnly": True})] @@ -59,6 +60,7 @@ class CreateAgentRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) metadata: dict[str, Any] | None = None @@ -92,6 +94,7 @@ class CreateAgentRequest(BaseModel): class CreateOrUpdateAgentRequest(CreateAgentRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: UUID @@ -130,6 +133,7 @@ class PatchAgentRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) metadata: dict[str, Any] | None = None @@ -167,6 +171,7 @@ class UpdateAgentRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) metadata: dict[str, Any] | None = None diff --git a/agents-api/agents_api/autogen/Chat.py b/agents-api/agents_api/autogen/Chat.py index 4d157f7c5..19c9fb05e 100644 --- a/agents-api/agents_api/autogen/Chat.py +++ b/agents-api/agents_api/autogen/Chat.py @@ -6,7 +6,7 @@ from typing import Annotated, Literal from uuid import UUID -from pydantic import AwareDatetime, BaseModel, ConfigDict, Field +from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, StrictBool from .Common import LogitBias from .Docs import DocReference @@ -16,6 +16,7 @@ class BaseChatOutput(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) index: int @@ -31,6 +32,7 @@ class BaseChatOutput(BaseModel): class BaseChatResponse(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) usage: CompetionUsage | None = None @@ -54,6 +56,7 @@ class BaseChatResponse(BaseModel): class BaseTokenLogProb(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) token: str @@ -66,6 +69,7 @@ class BaseTokenLogProb(BaseModel): class ChatInputData(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) messages: Annotated[list[InputChatMLMessage], Field(min_length=1)] @@ -88,6 +92,7 @@ class ChatOutputChunk(BaseChatOutput): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) delta: InputChatMLMessage @@ -98,6 +103,7 @@ class ChatOutputChunk(BaseChatOutput): class ChunkChatResponse(BaseChatResponse): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) choices: list[ChatOutputChunk] @@ -112,6 +118,7 @@ class CompetionUsage(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) completion_tokens: Annotated[ @@ -136,6 +143,7 @@ class CompetionUsage(BaseModel): class CompletionResponseFormat(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["text", "json_object"] = "text" @@ -146,6 +154,7 @@ class CompletionResponseFormat(BaseModel): class LogProbResponse(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) content: Annotated[list[TokenLogProb] | None, Field(...)] @@ -156,6 +165,7 @@ class LogProbResponse(BaseModel): class MessageChatResponse(BaseChatResponse): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) choices: list[SingleChatOutput | MultipleChatOutput] @@ -170,6 +180,7 @@ class MultipleChatOutput(BaseChatOutput): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) messages: list[InputChatMLMessage] @@ -177,6 +188,7 @@ class MultipleChatOutput(BaseChatOutput): class OpenAISettings(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) frequency_penalty: Annotated[float | None, Field(None, ge=-2.0, le=2.0)] @@ -203,6 +215,7 @@ class SingleChatOutput(BaseChatOutput): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) message: InputChatMLMessage @@ -210,6 +223,7 @@ class SingleChatOutput(BaseChatOutput): class TokenLogProb(BaseTokenLogProb): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) top_logprobs: list[BaseTokenLogProb] @@ -217,17 +231,18 @@ class TokenLogProb(BaseTokenLogProb): class ChatInput(ChatInputData): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) - remember: Annotated[bool, Field(False, json_schema_extra={"readOnly": True})] + remember: Annotated[StrictBool, Field(False, json_schema_extra={"readOnly": True})] """ DISABLED: Whether this interaction should form new memories or not (will be enabled in a future release) """ - recall: bool = True + recall: StrictBool = True """ Whether previous memories and docs should be recalled or not """ - save: bool = True + save: StrictBool = True """ Whether this interaction should be stored in the session history or not """ @@ -241,7 +256,7 @@ class ChatInput(ChatInputData): """ Identifier of the model to be used """ - stream: bool = False + stream: StrictBool = False """ Indicates if the server should stream the response as it's generated """ @@ -305,6 +320,7 @@ class DefaultChatSettings(OpenAISettings): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) repetition_penalty: Annotated[float | None, Field(None, ge=0.0, le=2.0)] @@ -323,6 +339,7 @@ class DefaultChatSettings(OpenAISettings): class ChatSettings(DefaultChatSettings): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) model: Annotated[ @@ -335,7 +352,7 @@ class ChatSettings(DefaultChatSettings): """ Identifier of the model to be used """ - stream: bool = False + stream: StrictBool = False """ Indicates if the server should stream the response as it's generated """ diff --git a/agents-api/agents_api/autogen/Common.py b/agents-api/agents_api/autogen/Common.py index aab88621d..7dedd743e 100644 --- a/agents-api/agents_api/autogen/Common.py +++ b/agents-api/agents_api/autogen/Common.py @@ -38,6 +38,7 @@ class Offset(RootModel[int]): class ResourceCreatedResponse(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: UUID @@ -56,6 +57,7 @@ class ResourceCreatedResponse(BaseModel): class ResourceDeletedResponse(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: UUID @@ -74,6 +76,7 @@ class ResourceDeletedResponse(BaseModel): class ResourceUpdatedResponse(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: UUID diff --git a/agents-api/agents_api/autogen/Docs.py b/agents-api/agents_api/autogen/Docs.py index 36d0c5a95..3039fc3f4 100644 --- a/agents-api/agents_api/autogen/Docs.py +++ b/agents-api/agents_api/autogen/Docs.py @@ -11,6 +11,7 @@ class BaseDocSearchRequest(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) limit: Annotated[int, Field(10, ge=1, le=100)] @@ -26,6 +27,7 @@ class CreateDocRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) metadata: dict[str, Any] | None = None @@ -46,6 +48,7 @@ class CreateDocRequest(BaseModel): class Doc(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: Annotated[UUID, Field(json_schema_extra={"readOnly": True})] @@ -71,6 +74,7 @@ class Doc(BaseModel): class DocOwner(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: UUID @@ -79,6 +83,7 @@ class DocOwner(BaseModel): class DocReference(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) owner: DocOwner @@ -96,6 +101,7 @@ class DocReference(BaseModel): class DocSearchResponse(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) docs: list[DocReference] @@ -110,6 +116,7 @@ class DocSearchResponse(BaseModel): class EmbedQueryRequest(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) text: str | list[str] @@ -120,6 +127,7 @@ class EmbedQueryRequest(BaseModel): class EmbedQueryResponse(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) vectors: list[list[float]] @@ -130,6 +138,7 @@ class EmbedQueryResponse(BaseModel): class HybridDocSearchRequest(BaseDocSearchRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) confidence: Annotated[float, Field(0.5, ge=0.0, le=1.0)] @@ -152,6 +161,7 @@ class HybridDocSearchRequest(BaseDocSearchRequest): class Snippet(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) index: int @@ -160,6 +170,7 @@ class Snippet(BaseModel): class TextOnlyDocSearchRequest(BaseDocSearchRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) text: str @@ -170,6 +181,7 @@ class TextOnlyDocSearchRequest(BaseDocSearchRequest): class VectorDocSearchRequest(BaseDocSearchRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) confidence: Annotated[float, Field(0.5, ge=0.0, le=1.0)] diff --git a/agents-api/agents_api/autogen/Entries.py b/agents-api/agents_api/autogen/Entries.py index 00070bd71..dc64872a1 100644 --- a/agents-api/agents_api/autogen/Entries.py +++ b/agents-api/agents_api/autogen/Entries.py @@ -6,13 +6,21 @@ from typing import Annotated, Literal from uuid import UUID -from pydantic import AnyUrl, AwareDatetime, BaseModel, ConfigDict, Field +from pydantic import ( + AnyUrl, + AwareDatetime, + BaseModel, + ConfigDict, + Field, + StrictBool, +) from .Tools import ChosenToolCall, Tool, ToolResponse class BaseEntry(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) role: Literal[ @@ -55,6 +63,7 @@ class BaseEntry(BaseModel): class ChatMLImageContentPart(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) image_url: ImageURL @@ -69,6 +78,7 @@ class ChatMLImageContentPart(BaseModel): class ChatMLTextContentPart(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) text: str @@ -80,6 +90,7 @@ class ChatMLTextContentPart(BaseModel): class Entry(BaseEntry): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) created_at: Annotated[AwareDatetime, Field(json_schema_extra={"readOnly": True})] @@ -91,6 +102,7 @@ class Entry(BaseEntry): class History(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) entries: list[Entry] @@ -104,6 +116,7 @@ class History(BaseModel): class ImageURL(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) url: AnyUrl @@ -118,6 +131,7 @@ class ImageURL(BaseModel): class InputChatMLMessage(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) role: Literal[ @@ -140,7 +154,7 @@ class InputChatMLMessage(BaseModel): """ Name """ - continue_: Annotated[bool | None, Field(None, alias="continue")] + continue_: Annotated[StrictBool | None, Field(None, alias="continue")] """ Whether to continue this message or return a new one """ @@ -148,6 +162,7 @@ class InputChatMLMessage(BaseModel): class Relation(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) head: UUID diff --git a/agents-api/agents_api/autogen/Executions.py b/agents-api/agents_api/autogen/Executions.py index 4ff4c4b66..97046d7d9 100644 --- a/agents-api/agents_api/autogen/Executions.py +++ b/agents-api/agents_api/autogen/Executions.py @@ -15,6 +15,7 @@ class CreateExecutionRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) input: dict[str, Any] @@ -26,6 +27,7 @@ class CreateExecutionRequest(BaseModel): class Execution(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) task_id: Annotated[UUID, Field(json_schema_extra={"readOnly": True})] @@ -65,6 +67,7 @@ class Execution(BaseModel): class TaskTokenResumeExecutionRequest(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) status: Literal["running"] = "running" @@ -76,6 +79,7 @@ class TaskTokenResumeExecutionRequest(BaseModel): class Transition(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Annotated[ @@ -102,6 +106,7 @@ class Transition(BaseModel): class TransitionTarget(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) workflow: Annotated[ @@ -120,6 +125,7 @@ class TransitionTarget(BaseModel): class UpdateExecutionRequest(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) status: Literal[ @@ -135,6 +141,7 @@ class UpdateExecutionRequest(BaseModel): class ResumeExecutionRequest(UpdateExecutionRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) status: Literal["running"] = "running" @@ -146,6 +153,7 @@ class ResumeExecutionRequest(UpdateExecutionRequest): class StopExecutionRequest(UpdateExecutionRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) status: Literal["cancelled"] = "cancelled" diff --git a/agents-api/agents_api/autogen/Jobs.py b/agents-api/agents_api/autogen/Jobs.py index 92acce9ad..a3402d04d 100644 --- a/agents-api/agents_api/autogen/Jobs.py +++ b/agents-api/agents_api/autogen/Jobs.py @@ -6,11 +6,12 @@ from typing import Annotated, Literal from uuid import UUID -from pydantic import AwareDatetime, BaseModel, ConfigDict, Field +from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, StrictBool class JobStatus(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: Annotated[UUID, Field(json_schema_extra={"readOnly": True})] @@ -36,7 +37,7 @@ class JobStatus(BaseModel): """ Reason for the current state of the job """ - has_progress: bool = False + has_progress: StrictBool = False """ Whether this Job supports progress updates """ diff --git a/agents-api/agents_api/autogen/Sessions.py b/agents-api/agents_api/autogen/Sessions.py index fdfe25c92..caf47c278 100644 --- a/agents-api/agents_api/autogen/Sessions.py +++ b/agents-api/agents_api/autogen/Sessions.py @@ -6,7 +6,7 @@ from typing import Annotated, Any, Literal from uuid import UUID -from pydantic import AwareDatetime, BaseModel, ConfigDict, Field +from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, StrictBool class CreateSessionRequest(BaseModel): @@ -15,6 +15,7 @@ class CreateSessionRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) user: UUID | None = None @@ -31,7 +32,7 @@ class CreateSessionRequest(BaseModel): """ A specific situation that sets the background for this session """ - render_templates: bool = True + render_templates: StrictBool = True """ Render system and assistant message content as jinja templates """ @@ -52,13 +53,14 @@ class PatchSessionRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' """ A specific situation that sets the background for this session """ - render_templates: bool = True + render_templates: StrictBool = True """ Render system and assistant message content as jinja templates """ @@ -75,6 +77,7 @@ class PatchSessionRequest(BaseModel): class Session(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' @@ -85,7 +88,7 @@ class Session(BaseModel): """ Summary (null at the beginning) - generated automatically after every interaction """ - render_templates: bool = True + render_templates: StrictBool = True """ Render system and assistant message content as jinja templates """ @@ -115,6 +118,7 @@ class Session(BaseModel): class SingleAgentMultiUserSession(Session): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) agent: UUID @@ -123,6 +127,7 @@ class SingleAgentMultiUserSession(Session): class SingleAgentNoUserSession(Session): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) agent: UUID @@ -130,6 +135,7 @@ class SingleAgentNoUserSession(Session): class SingleAgentSingleUserSession(Session): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) agent: UUID @@ -142,13 +148,14 @@ class UpdateSessionRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' """ A specific situation that sets the background for this session """ - render_templates: bool = True + render_templates: StrictBool = True """ Render system and assistant message content as jinja templates """ @@ -165,6 +172,7 @@ class UpdateSessionRequest(BaseModel): class CreateOrUpdateSessionRequest(CreateSessionRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: UUID @@ -182,7 +190,7 @@ class CreateOrUpdateSessionRequest(CreateSessionRequest): """ A specific situation that sets the background for this session """ - render_templates: bool = True + render_templates: StrictBool = True """ Render system and assistant message content as jinja templates """ @@ -199,6 +207,7 @@ class CreateOrUpdateSessionRequest(CreateSessionRequest): class MultiAgentMultiUserSession(Session): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) agents: list[UUID] @@ -207,6 +216,7 @@ class MultiAgentMultiUserSession(Session): class MultiAgentNoUserSession(Session): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) agents: list[UUID] @@ -214,6 +224,7 @@ class MultiAgentNoUserSession(Session): class MultiAgentSingleUserSession(Session): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) agents: list[UUID] diff --git a/agents-api/agents_api/autogen/Tasks.py b/agents-api/agents_api/autogen/Tasks.py index 742dcc3cf..b3059cc12 100644 --- a/agents-api/agents_api/autogen/Tasks.py +++ b/agents-api/agents_api/autogen/Tasks.py @@ -6,7 +6,7 @@ from typing import Annotated, Any, Literal from uuid import UUID -from pydantic import AwareDatetime, BaseModel, ConfigDict, Field +from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, StrictBool from .Chat import ChatSettings from .Docs import ( @@ -21,6 +21,7 @@ class BaseWorkflowStep(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal[ @@ -50,6 +51,7 @@ class BaseWorkflowStep(BaseModel): class CaseThen(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) case: str @@ -82,6 +84,7 @@ class CreateTaskRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) name: str @@ -117,7 +120,7 @@ class CreateTaskRequest(BaseModel): """ Tools defined specifically for this task not included in the Agent itself. """ - inherit_tools: bool = True + inherit_tools: StrictBool = True """ Whether to inherit tools from the parent agent or not. Defaults to true. """ @@ -126,6 +129,7 @@ class CreateTaskRequest(BaseModel): class EmbedStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["embed"] = "embed" @@ -137,6 +141,7 @@ class EmbedStep(BaseWorkflowStep): class ErrorWorkflowStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["error"] = "error" @@ -148,6 +153,7 @@ class ErrorWorkflowStep(BaseWorkflowStep): class EvaluateStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["evaluate"] = "evaluate" @@ -159,6 +165,7 @@ class EvaluateStep(BaseWorkflowStep): class ForeachDo(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) in_: Annotated[str, Field(alias="in")] @@ -187,6 +194,7 @@ class ForeachDo(BaseModel): class ForeachStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["foreach"] = "foreach" @@ -198,6 +206,7 @@ class ForeachStep(BaseWorkflowStep): class GetStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["get"] = "get" @@ -209,6 +218,7 @@ class GetStep(BaseWorkflowStep): class IfElseWorkflowStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["if_else"] = "if_else" @@ -257,6 +267,7 @@ class IfElseWorkflowStep(BaseWorkflowStep): class LogStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["log"] = "log" @@ -268,6 +279,7 @@ class LogStep(BaseWorkflowStep): class MapOver(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) over: str @@ -282,6 +294,7 @@ class MapOver(BaseModel): class MapReduceStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["map_reduce"] = "map_reduce" @@ -297,6 +310,7 @@ class MapReduceStep(BaseWorkflowStep): class ParallelStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["parallel"] = "parallel" @@ -326,6 +340,7 @@ class PatchTaskRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) description: str = "" @@ -363,7 +378,7 @@ class PatchTaskRequest(BaseModel): """ Tools defined specifically for this task not included in the Agent itself. """ - inherit_tools: bool = True + inherit_tools: StrictBool = True """ Whether to inherit tools from the parent agent or not. Defaults to true. """ @@ -372,6 +387,7 @@ class PatchTaskRequest(BaseModel): class PromptStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["prompt"] = "prompt" @@ -387,6 +403,7 @@ class PromptStep(BaseWorkflowStep): class ReturnStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["return"] = "return" @@ -398,6 +415,7 @@ class ReturnStep(BaseWorkflowStep): class SearchStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["search"] = "search" @@ -409,6 +427,7 @@ class SearchStep(BaseWorkflowStep): class SetKey(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) key: str @@ -423,6 +442,7 @@ class SetKey(BaseModel): class SetStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["set"] = "set" @@ -434,6 +454,7 @@ class SetStep(BaseWorkflowStep): class SleepFor(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) seconds: Annotated[int, Field(0, ge=0)] @@ -456,6 +477,7 @@ class SleepFor(BaseModel): class SleepStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["sleep"] = "sleep" @@ -467,6 +489,7 @@ class SleepStep(BaseWorkflowStep): class SwitchStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["switch"] = "switch" @@ -482,6 +505,7 @@ class Task(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) name: str @@ -517,7 +541,7 @@ class Task(BaseModel): """ Tools defined specifically for this task not included in the Agent itself. """ - inherit_tools: bool = True + inherit_tools: StrictBool = True """ Whether to inherit tools from the parent agent or not. Defaults to true. """ @@ -535,9 +559,10 @@ class Task(BaseModel): class TaskTool(CreateToolRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) - inherited: Annotated[bool, Field(False, json_schema_extra={"readOnly": True})] + inherited: Annotated[StrictBool, Field(False, json_schema_extra={"readOnly": True})] """ Read-only: Whether the tool was inherited or not. Only applies within tasks. """ @@ -545,6 +570,7 @@ class TaskTool(CreateToolRequest): class ToolCallStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["tool_call"] = "tool_call" @@ -554,7 +580,7 @@ class ToolCallStep(BaseWorkflowStep): """ The tool to run """ - arguments: dict[str, Any] + arguments: dict[str, str] """ The input parameters for the tool """ @@ -566,6 +592,7 @@ class UpdateTaskRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) description: str = "" @@ -600,7 +627,7 @@ class UpdateTaskRequest(BaseModel): """ Tools defined specifically for this task not included in the Agent itself. """ - inherit_tools: bool = True + inherit_tools: StrictBool = True """ Whether to inherit tools from the parent agent or not. Defaults to true. """ @@ -609,6 +636,7 @@ class UpdateTaskRequest(BaseModel): class WaitForInputStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["wait_for_input"] = "wait_for_input" @@ -620,6 +648,7 @@ class WaitForInputStep(BaseWorkflowStep): class YieldStep(BaseWorkflowStep): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) kind_: Literal["yield"] = "yield" diff --git a/agents-api/agents_api/autogen/Tools.py b/agents-api/agents_api/autogen/Tools.py index 6d7f60a6b..74d207d06 100644 --- a/agents-api/agents_api/autogen/Tools.py +++ b/agents-api/agents_api/autogen/Tools.py @@ -15,6 +15,7 @@ class ChosenToolCall(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function", "integration", "system", "api_call"] @@ -34,6 +35,7 @@ class CreateToolRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function", "integration", "system", "api_call"] @@ -52,6 +54,7 @@ class CreateToolRequest(BaseModel): class FunctionCallOption(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) name: str @@ -66,6 +69,7 @@ class FunctionDef(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) name: Any | None = None @@ -90,6 +94,7 @@ class FunctionDef(BaseModel): class NamedToolChoice(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function", "integration", "system", "api_call"] @@ -108,6 +113,7 @@ class PatchToolRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function", "integration", "system", "api_call"] | None = None @@ -126,6 +132,7 @@ class PatchToolRequest(BaseModel): class Tool(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function", "integration", "system", "api_call"] @@ -153,6 +160,7 @@ class Tool(BaseModel): class ToolResponse(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: UUID @@ -168,6 +176,7 @@ class UpdateToolRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function", "integration", "system", "api_call"] @@ -186,6 +195,7 @@ class UpdateToolRequest(BaseModel): class ChosenFunctionCall(ChosenToolCall): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function"] = "function" @@ -197,6 +207,7 @@ class ChosenFunctionCall(ChosenToolCall): class FunctionTool(Tool): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function"] = "function" @@ -209,6 +220,7 @@ class FunctionTool(Tool): class NamedFunctionChoice(NamedToolChoice): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) type: Literal["function"] = "function" diff --git a/agents-api/agents_api/autogen/Users.py b/agents-api/agents_api/autogen/Users.py index 409f5039b..24ba132ac 100644 --- a/agents-api/agents_api/autogen/Users.py +++ b/agents-api/agents_api/autogen/Users.py @@ -15,6 +15,7 @@ class CreateUserRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) metadata: dict[str, Any] | None = None @@ -40,6 +41,7 @@ class PatchUserRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) metadata: dict[str, Any] | None = None @@ -65,6 +67,7 @@ class UpdateUserRequest(BaseModel): """ model_config = ConfigDict( + extra="allow", populate_by_name=True, ) metadata: dict[str, Any] | None = None @@ -86,6 +89,7 @@ class UpdateUserRequest(BaseModel): class User(BaseModel): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: Annotated[UUID, Field(json_schema_extra={"readOnly": True})] @@ -116,6 +120,7 @@ class User(BaseModel): class CreateOrUpdateUserRequest(CreateUserRequest): model_config = ConfigDict( + extra="allow", populate_by_name=True, ) id: UUID diff --git a/agents-api/poetry.lock b/agents-api/poetry.lock index 98bc5c498..00d7a4708 100644 --- a/agents-api/poetry.lock +++ b/agents-api/poetry.lock @@ -13,87 +13,102 @@ files = [ [[package]] name = "aiohttp" -version = "3.10.4" +version = "3.10.5" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.8" files = [ - {file = "aiohttp-3.10.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:81037ddda8cc0a95c6d8c1b9029d0b19a62db8770c0e239e3bea0109d294ab66"}, - {file = "aiohttp-3.10.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:71944d4f4090afc07ce96b7029d5a574240e2f39570450df4af0d5b93a5ee64a"}, - {file = "aiohttp-3.10.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c774f08afecc0a617966f45a9c378456e713a999ee60654d9727617def3e4ee4"}, - {file = "aiohttp-3.10.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc990e73613c78ab2930b60266135066f37fdfce6b32dd604f42c5c377ee880a"}, - {file = "aiohttp-3.10.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f6acd1a908740f708358d240f9a3243cec31a456e3ded65c2cb46f6043bc6735"}, - {file = "aiohttp-3.10.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6075e27e7e54fbcd1c129c5699b2d251c885c9892e26d59a0fb7705141c2d14b"}, - {file = "aiohttp-3.10.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc98d93d11d860ac823beb6131f292d82efb76f226b5e28a3eab1ec578dfd041"}, - {file = "aiohttp-3.10.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:201ddf1471567568be381b6d4701e266a768f7eaa2f99ef753f2c9c5e1e3fb5c"}, - {file = "aiohttp-3.10.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7d202ec55e61f06b1a1eaf317fba7546855cbf803c13ce7625d462fb8c88e238"}, - {file = "aiohttp-3.10.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:96b2e7c110a941c8c1a692703b8ac1013e47f17ee03356c71d55c0a54de2ce38"}, - {file = "aiohttp-3.10.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8ba0fbc56c44883bd757ece433f9caadbca67f565934afe9bc53ba3bd99cc368"}, - {file = "aiohttp-3.10.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:46cc9069da466652bb7b8b3fac1f8ce2e12a9dc0fb11551faa420c4cdbc60abf"}, - {file = "aiohttp-3.10.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:93a19cd1e9dc703257fda78b8e889c3a08eabaa09f6ff0d867850b03964f80d1"}, - {file = "aiohttp-3.10.4-cp310-cp310-win32.whl", hash = "sha256:8593040bcc8075fc0e817a602bc5d3d74c7bd717619ffc175a8ba0188edebadf"}, - {file = "aiohttp-3.10.4-cp310-cp310-win_amd64.whl", hash = "sha256:326fb5228aadfc395981d9b336d56a698da335897c4143105c73b583d7500839"}, - {file = "aiohttp-3.10.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:dfe48f477e02ef5ab247c6ac431a6109c69b5c24cb3ccbcd3e27c4fb39691fe4"}, - {file = "aiohttp-3.10.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f6fe78b51852e25d4e20be51ef88c2a0bf31432b9f2223bdbd61c01a0f9253a7"}, - {file = "aiohttp-3.10.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5cc75ff5efbd92301e63a157fddb18a6964a3f40e31c77d57e97dbb9bb3373b4"}, - {file = "aiohttp-3.10.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dca39391f45fbb28daa6412f98c625265bf6b512cc41382df61672d1b242f8f4"}, - {file = "aiohttp-3.10.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8616dd5ed8b3b4029021b560305041c62e080bb28f238c27c2e150abe3539587"}, - {file = "aiohttp-3.10.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9d7958ba22854b3f00a7bbb66cde1dc759760ce8a3e6dfe9ea53f06bccaa9aa2"}, - {file = "aiohttp-3.10.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a24ac7164a824ef2e8e4e9a9f6debb1f43c44ad7ad04efc6018a6610555666d"}, - {file = "aiohttp-3.10.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:660ad010b8fd0b26e8edb8ae5c036db5b16baac4278198ad238b11956d920b3d"}, - {file = "aiohttp-3.10.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:93ee83008d3e505db9846a5a1f48a002676d8dcc90ee431a9462541c9b81393c"}, - {file = "aiohttp-3.10.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:77071795efd6ba87f409001141fb05c94ee962b9fca6c8fa1f735c2718512de4"}, - {file = "aiohttp-3.10.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ff371ae72a1816c3eeba5c9cff42cb739aaa293fec7d78f180d1c7ee342285b6"}, - {file = "aiohttp-3.10.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c253e81f12da97f85d45441e8c6da0d9c12e07db4a7136b0a955df6fc5e4bf51"}, - {file = "aiohttp-3.10.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:2ce101c447cf7ba4b6e5ab07bfa2c0da21cbab66922f78a601f0b84fd7710d72"}, - {file = "aiohttp-3.10.4-cp311-cp311-win32.whl", hash = "sha256:705c311ecf2d30fbcf3570d1a037c657be99095694223488140c47dee4ef2460"}, - {file = "aiohttp-3.10.4-cp311-cp311-win_amd64.whl", hash = "sha256:ebddbfea8a8d6b97f717658fa85a96681a28990072710d3de3a4eba5d6804a37"}, - {file = "aiohttp-3.10.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:fe4d63f42d9c604521b208b754abfafe01218af4a8f6332b43196ee8fe88bbd5"}, - {file = "aiohttp-3.10.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fef7b7bd3a6911b4d148332136d34d3c2aee3d54d354373b1da6d96bc08089a5"}, - {file = "aiohttp-3.10.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fff8606149098935188fe1e135f7e7991e6a36d6fe394fd15939fc57d0aff889"}, - {file = "aiohttp-3.10.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9eb3df1aa83602be9a5e572c834d74c3c8e382208b59a873aabfe4c493c45ed0"}, - {file = "aiohttp-3.10.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5c4a71d4a5e0cbfd4bfadd13cb84fe2bc76c64d550dc4f22c22008c9354cffb3"}, - {file = "aiohttp-3.10.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf61884a604c399458c4a42c8caea000fbcc44255ed89577ff50cb688a0fe8e2"}, - {file = "aiohttp-3.10.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2015e4b40bd5dedc8155c2b2d24a2b07963ae02b5772373d0b599a68e38a316b"}, - {file = "aiohttp-3.10.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b06e1a66bf0a1a2d0f12aef25843dfd2093df080d6c1acbc43914bb9c8f36ed3"}, - {file = "aiohttp-3.10.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:eb898c9ad5a1228a669ebe2e2ba3d76aebe1f7c10b78f09a36000254f049fc2b"}, - {file = "aiohttp-3.10.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:2d64a5a7539320c3cecb4bca093ea825fcc906f8461cf8b42a7bf3c706ce1932"}, - {file = "aiohttp-3.10.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:438c6e1492d060b21285f4b6675b941cf96dd9ef3dfdd59940561029b82e3e1f"}, - {file = "aiohttp-3.10.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e99bf118afb2584848dba169a685fe092b338a4fe52ae08c7243d7bc4cc204fe"}, - {file = "aiohttp-3.10.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9dc26781fb95225c6170619dece8b5c6ca7cfb1b0be97b7ee719915773d0c2a9"}, - {file = "aiohttp-3.10.4-cp312-cp312-win32.whl", hash = "sha256:45bb655cb8b3a61e19977183a4e0962051ae90f6d46588ed4addb8232128141c"}, - {file = "aiohttp-3.10.4-cp312-cp312-win_amd64.whl", hash = "sha256:347bbdc48411badc24fe3a13565820bc742db3aa2f9127cd5f48c256caf87e29"}, - {file = "aiohttp-3.10.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:4ad284cee0fdcdc0216346b849fd53d201b510aff3c48aa3622daec9ada4bf80"}, - {file = "aiohttp-3.10.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:58df59234be7d7e80548b9482ebfeafdda21948c25cb2873c7f23870c8053dfe"}, - {file = "aiohttp-3.10.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5f52225af7f91f27b633f73473e9ef0aa8e2112d57b69eaf3aa4479e3ea3bc0e"}, - {file = "aiohttp-3.10.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93f1a0e12c321d923c024b56d7dcd8012e60bf30a4b3fb69a88be15dcb9ab80b"}, - {file = "aiohttp-3.10.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9e9e9a51dd12f2f71fdbd7f7230dcb75ed8f77d8ac8e07c73b599b6d7027e5c"}, - {file = "aiohttp-3.10.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:38bb515f1affc36d3d97b02bf82099925a5785c4a96066ff4400a83ad09d3d5d"}, - {file = "aiohttp-3.10.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e685afb0e3b7b861d89cb3690d89eeda221b43095352efddaaa735c6baf87f3"}, - {file = "aiohttp-3.10.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd5673e3391564871ba6753cf674dcf2051ef19dc508998fe0758a6c7b429a0"}, - {file = "aiohttp-3.10.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:4b34e5086e1ead3baa740e32adf35cc5e42338e44c4b07f7b62b41ca6d6a5bfd"}, - {file = "aiohttp-3.10.4-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:c3fd3b8f0164fb2866400cd6eb9e884ab0dc95f882cf8b25e560ace7350c552d"}, - {file = "aiohttp-3.10.4-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:b95e1694d234f27b4bbf5bdef56bb751974ac5dbe045b1e462bde1fe39421cbe"}, - {file = "aiohttp-3.10.4-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:c031de4dfabe7bb6565743745ab43d20588944ddfc7233360169cab4008eee2f"}, - {file = "aiohttp-3.10.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:03c5a3143d4a82c43a3d82ac77d9cdef527a72f1c04dcca7b14770879f33d196"}, - {file = "aiohttp-3.10.4-cp38-cp38-win32.whl", hash = "sha256:b71722b527445e02168e2d1cf435772731874671a647fa159ad000feea7933b6"}, - {file = "aiohttp-3.10.4-cp38-cp38-win_amd64.whl", hash = "sha256:0fd1f57aac7d01c9c768675d531976d20d5b79d9da67fac87e55d41b4ade05f9"}, - {file = "aiohttp-3.10.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:15b36a644d1f44ea3d94a0bbb71e75d5f394a3135dc388a209466e22b711ce64"}, - {file = "aiohttp-3.10.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:394ddf9d216cf0bd429b223239a0ab628f01a7a1799c93ce4685eedcdd51b9bc"}, - {file = "aiohttp-3.10.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dd33f4d571b4143fc9318c3d9256423579c7d183635acc458a6db81919ae5204"}, - {file = "aiohttp-3.10.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5991b80886655e6c785aadf3114d4f86e6bec2da436e2bb62892b9f048450a4"}, - {file = "aiohttp-3.10.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:92021bf0a4b9ad16851a6c1ca3c86e5b09aecca4f7a2576430c6bbf3114922b1"}, - {file = "aiohttp-3.10.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:938e37fd337343c67471098736deb33066d72cec7d8927b9c1b6b4ea807ade9e"}, - {file = "aiohttp-3.10.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d697023b16c62f9aeb3ffdfb8ec4ac3afd477388993b9164b47dadbd60e7062"}, - {file = "aiohttp-3.10.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c2f9f07fe6d0d51bd2a788cbb339f1570fd691449c53b5dec83ff838f117703e"}, - {file = "aiohttp-3.10.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:50ac670f3fc13ce95e4d6d5a299db9288cc84c663aa630142444ef504756fcf7"}, - {file = "aiohttp-3.10.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9bcdd19398212785a9cb82a63a4b75a299998343f3f5732dfd37c1a4275463f9"}, - {file = "aiohttp-3.10.4-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:122c26f0976225aba46f381e3cabb5ef89a08af6503fc30493fb732e578cfa55"}, - {file = "aiohttp-3.10.4-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:d0665e2a346b6b66959f831ffffd8aa71dd07dd2300017d478f5b47573e66cfe"}, - {file = "aiohttp-3.10.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:625a4a9d4b9f80e7bbaaf2ace06341cf701b2fee54232843addf0bb7304597fb"}, - {file = "aiohttp-3.10.4-cp39-cp39-win32.whl", hash = "sha256:5115490112f39f16ae87c1b34dff3e2c95306cf456b1d2af5974c4ac7d2d1ec7"}, - {file = "aiohttp-3.10.4-cp39-cp39-win_amd64.whl", hash = "sha256:9b58b2ef7f28a2462ba86acbf3b20371bd80a1faa1cfd82f31968af4ac81ef25"}, - {file = "aiohttp-3.10.4.tar.gz", hash = "sha256:23a5f97e7dd22e181967fb6cb6c3b11653b0fdbbc4bb7739d9b6052890ccab96"}, + {file = "aiohttp-3.10.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:18a01eba2574fb9edd5f6e5fb25f66e6ce061da5dab5db75e13fe1558142e0a3"}, + {file = "aiohttp-3.10.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:94fac7c6e77ccb1ca91e9eb4cb0ac0270b9fb9b289738654120ba8cebb1189c6"}, + {file = "aiohttp-3.10.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2f1f1c75c395991ce9c94d3e4aa96e5c59c8356a15b1c9231e783865e2772699"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f7acae3cf1a2a2361ec4c8e787eaaa86a94171d2417aae53c0cca6ca3118ff6"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:94c4381ffba9cc508b37d2e536b418d5ea9cfdc2848b9a7fea6aebad4ec6aac1"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c31ad0c0c507894e3eaa843415841995bf8de4d6b2d24c6e33099f4bc9fc0d4f"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0912b8a8fadeb32ff67a3ed44249448c20148397c1ed905d5dac185b4ca547bb"}, + {file = "aiohttp-3.10.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0d93400c18596b7dc4794d48a63fb361b01a0d8eb39f28800dc900c8fbdaca91"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d00f3c5e0d764a5c9aa5a62d99728c56d455310bcc288a79cab10157b3af426f"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:d742c36ed44f2798c8d3f4bc511f479b9ceef2b93f348671184139e7d708042c"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:814375093edae5f1cb31e3407997cf3eacefb9010f96df10d64829362ae2df69"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8224f98be68a84b19f48e0bdc14224b5a71339aff3a27df69989fa47d01296f3"}, + {file = "aiohttp-3.10.5-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d9a487ef090aea982d748b1b0d74fe7c3950b109df967630a20584f9a99c0683"}, + {file = "aiohttp-3.10.5-cp310-cp310-win32.whl", hash = "sha256:d9ef084e3dc690ad50137cc05831c52b6ca428096e6deb3c43e95827f531d5ef"}, + {file = "aiohttp-3.10.5-cp310-cp310-win_amd64.whl", hash = "sha256:66bf9234e08fe561dccd62083bf67400bdbf1c67ba9efdc3dac03650e97c6088"}, + {file = "aiohttp-3.10.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8c6a4e5e40156d72a40241a25cc226051c0a8d816610097a8e8f517aeacd59a2"}, + {file = "aiohttp-3.10.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c634a3207a5445be65536d38c13791904fda0748b9eabf908d3fe86a52941cf"}, + {file = "aiohttp-3.10.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4aff049b5e629ef9b3e9e617fa6e2dfeda1bf87e01bcfecaf3949af9e210105e"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1942244f00baaacaa8155eca94dbd9e8cc7017deb69b75ef67c78e89fdad3c77"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e04a1f2a65ad2f93aa20f9ff9f1b672bf912413e5547f60749fa2ef8a644e061"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7f2bfc0032a00405d4af2ba27f3c429e851d04fad1e5ceee4080a1c570476697"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:424ae21498790e12eb759040bbb504e5e280cab64693d14775c54269fd1d2bb7"}, + {file = "aiohttp-3.10.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:975218eee0e6d24eb336d0328c768ebc5d617609affaca5dbbd6dd1984f16ed0"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4120d7fefa1e2d8fb6f650b11489710091788de554e2b6f8347c7a20ceb003f5"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b90078989ef3fc45cf9221d3859acd1108af7560c52397ff4ace8ad7052a132e"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ba5a8b74c2a8af7d862399cdedce1533642fa727def0b8c3e3e02fcb52dca1b1"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:02594361128f780eecc2a29939d9dfc870e17b45178a867bf61a11b2a4367277"}, + {file = "aiohttp-3.10.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:8fb4fc029e135859f533025bc82047334e24b0d489e75513144f25408ecaf058"}, + {file = "aiohttp-3.10.5-cp311-cp311-win32.whl", hash = "sha256:e1ca1ef5ba129718a8fc827b0867f6aa4e893c56eb00003b7367f8a733a9b072"}, + {file = "aiohttp-3.10.5-cp311-cp311-win_amd64.whl", hash = "sha256:349ef8a73a7c5665cca65c88ab24abe75447e28aa3bc4c93ea5093474dfdf0ff"}, + {file = "aiohttp-3.10.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:305be5ff2081fa1d283a76113b8df7a14c10d75602a38d9f012935df20731487"}, + {file = "aiohttp-3.10.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3a1c32a19ee6bbde02f1cb189e13a71b321256cc1d431196a9f824050b160d5a"}, + {file = "aiohttp-3.10.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:61645818edd40cc6f455b851277a21bf420ce347baa0b86eaa41d51ef58ba23d"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c225286f2b13bab5987425558baa5cbdb2bc925b2998038fa028245ef421e75"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8ba01ebc6175e1e6b7275c907a3a36be48a2d487549b656aa90c8a910d9f3178"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8eaf44ccbc4e35762683078b72bf293f476561d8b68ec8a64f98cf32811c323e"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1c43eb1ab7cbf411b8e387dc169acb31f0ca0d8c09ba63f9eac67829585b44f"}, + {file = "aiohttp-3.10.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de7a5299827253023c55ea549444e058c0eb496931fa05d693b95140a947cb73"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4790f0e15f00058f7599dab2b206d3049d7ac464dc2e5eae0e93fa18aee9e7bf"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:44b324a6b8376a23e6ba25d368726ee3bc281e6ab306db80b5819999c737d820"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0d277cfb304118079e7044aad0b76685d30ecb86f83a0711fc5fb257ffe832ca"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:54d9ddea424cd19d3ff6128601a4a4d23d54a421f9b4c0fff740505813739a91"}, + {file = "aiohttp-3.10.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4f1c9866ccf48a6df2b06823e6ae80573529f2af3a0992ec4fe75b1a510df8a6"}, + {file = "aiohttp-3.10.5-cp312-cp312-win32.whl", hash = "sha256:dc4826823121783dccc0871e3f405417ac116055bf184ac04c36f98b75aacd12"}, + {file = "aiohttp-3.10.5-cp312-cp312-win_amd64.whl", hash = "sha256:22c0a23a3b3138a6bf76fc553789cb1a703836da86b0f306b6f0dc1617398abc"}, + {file = "aiohttp-3.10.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7f6b639c36734eaa80a6c152a238242bedcee9b953f23bb887e9102976343092"}, + {file = "aiohttp-3.10.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f29930bc2921cef955ba39a3ff87d2c4398a0394ae217f41cb02d5c26c8b1b77"}, + {file = "aiohttp-3.10.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f489a2c9e6455d87eabf907ac0b7d230a9786be43fbe884ad184ddf9e9c1e385"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:123dd5b16b75b2962d0fff566effb7a065e33cd4538c1692fb31c3bda2bfb972"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b98e698dc34966e5976e10bbca6d26d6724e6bdea853c7c10162a3235aba6e16"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3b9162bab7e42f21243effc822652dc5bb5e8ff42a4eb62fe7782bcbcdfacf6"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1923a5c44061bffd5eebeef58cecf68096e35003907d8201a4d0d6f6e387ccaa"}, + {file = "aiohttp-3.10.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d55f011da0a843c3d3df2c2cf4e537b8070a419f891c930245f05d329c4b0689"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:afe16a84498441d05e9189a15900640a2d2b5e76cf4efe8cbb088ab4f112ee57"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:f8112fb501b1e0567a1251a2fd0747baae60a4ab325a871e975b7bb67e59221f"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1e72589da4c90337837fdfe2026ae1952c0f4a6e793adbbfbdd40efed7c63599"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:4d46c7b4173415d8e583045fbc4daa48b40e31b19ce595b8d92cf639396c15d5"}, + {file = "aiohttp-3.10.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:33e6bc4bab477c772a541f76cd91e11ccb6d2efa2b8d7d7883591dfb523e5987"}, + {file = "aiohttp-3.10.5-cp313-cp313-win32.whl", hash = "sha256:c58c6837a2c2a7cf3133983e64173aec11f9c2cd8e87ec2fdc16ce727bcf1a04"}, + {file = "aiohttp-3.10.5-cp313-cp313-win_amd64.whl", hash = "sha256:38172a70005252b6893088c0f5e8a47d173df7cc2b2bd88650957eb84fcf5022"}, + {file = "aiohttp-3.10.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:f6f18898ace4bcd2d41a122916475344a87f1dfdec626ecde9ee802a711bc569"}, + {file = "aiohttp-3.10.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5ede29d91a40ba22ac1b922ef510aab871652f6c88ef60b9dcdf773c6d32ad7a"}, + {file = "aiohttp-3.10.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:673f988370f5954df96cc31fd99c7312a3af0a97f09e407399f61583f30da9bc"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58718e181c56a3c02d25b09d4115eb02aafe1a732ce5714ab70326d9776457c3"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4b38b1570242fbab8d86a84128fb5b5234a2f70c2e32f3070143a6d94bc854cf"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:074d1bff0163e107e97bd48cad9f928fa5a3eb4b9d33366137ffce08a63e37fe"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd31f176429cecbc1ba499d4aba31aaccfea488f418d60376b911269d3b883c5"}, + {file = "aiohttp-3.10.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7384d0b87d4635ec38db9263e6a3f1eb609e2e06087f0aa7f63b76833737b471"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:8989f46f3d7ef79585e98fa991e6ded55d2f48ae56d2c9fa5e491a6e4effb589"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:c83f7a107abb89a227d6c454c613e7606c12a42b9a4ca9c5d7dad25d47c776ae"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:cde98f323d6bf161041e7627a5fd763f9fd829bcfcd089804a5fdce7bb6e1b7d"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:676f94c5480d8eefd97c0c7e3953315e4d8c2b71f3b49539beb2aa676c58272f"}, + {file = "aiohttp-3.10.5-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:2d21ac12dc943c68135ff858c3a989f2194a709e6e10b4c8977d7fcd67dfd511"}, + {file = "aiohttp-3.10.5-cp38-cp38-win32.whl", hash = "sha256:17e997105bd1a260850272bfb50e2a328e029c941c2708170d9d978d5a30ad9a"}, + {file = "aiohttp-3.10.5-cp38-cp38-win_amd64.whl", hash = "sha256:1c19de68896747a2aa6257ae4cf6ef59d73917a36a35ee9d0a6f48cff0f94db8"}, + {file = "aiohttp-3.10.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7e2fe37ac654032db1f3499fe56e77190282534810e2a8e833141a021faaab0e"}, + {file = "aiohttp-3.10.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f5bf3ead3cb66ab990ee2561373b009db5bc0e857549b6c9ba84b20bc462e172"}, + {file = "aiohttp-3.10.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1b2c16a919d936ca87a3c5f0e43af12a89a3ce7ccbce59a2d6784caba945b68b"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad146dae5977c4dd435eb31373b3fe9b0b1bf26858c6fc452bf6af394067e10b"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c5c6fa16412b35999320f5c9690c0f554392dc222c04e559217e0f9ae244b92"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:95c4dc6f61d610bc0ee1edc6f29d993f10febfe5b76bb470b486d90bbece6b22"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da452c2c322e9ce0cfef392e469a26d63d42860f829026a63374fde6b5c5876f"}, + {file = "aiohttp-3.10.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:898715cf566ec2869d5cb4d5fb4be408964704c46c96b4be267442d265390f32"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:391cc3a9c1527e424c6865e087897e766a917f15dddb360174a70467572ac6ce"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:380f926b51b92d02a34119d072f178d80bbda334d1a7e10fa22d467a66e494db"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ce91db90dbf37bb6fa0997f26574107e1b9d5ff939315247b7e615baa8ec313b"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9093a81e18c45227eebe4c16124ebf3e0d893830c6aca7cc310bfca8fe59d857"}, + {file = "aiohttp-3.10.5-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ee40b40aa753d844162dcc80d0fe256b87cba48ca0054f64e68000453caead11"}, + {file = "aiohttp-3.10.5-cp39-cp39-win32.whl", hash = "sha256:03f2645adbe17f274444953bdea69f8327e9d278d961d85657cb0d06864814c1"}, + {file = "aiohttp-3.10.5-cp39-cp39-win_amd64.whl", hash = "sha256:d17920f18e6ee090bdd3d0bfffd769d9f2cb4c8ffde3eb203777a3895c128862"}, + {file = "aiohttp-3.10.5.tar.gz", hash = "sha256:f071854b47d39591ce9a17981c46790acb30518e2f83dfca8db2dfa091178691"}, ] [package.dependencies] @@ -1229,13 +1244,13 @@ networkx = ">=2" [[package]] name = "importlib-metadata" -version = "8.2.0" +version = "8.3.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-8.2.0-py3-none-any.whl", hash = "sha256:11901fa0c2f97919b288679932bb64febaeacf289d18ac84dd68cb2e74213369"}, - {file = "importlib_metadata-8.2.0.tar.gz", hash = "sha256:72e8d4399996132204f9a16dcc751af254a48f8d1b20b9ff0f98d4a8f901e73d"}, + {file = "importlib_metadata-8.3.0-py3-none-any.whl", hash = "sha256:42817a4a0be5845d22c6e212db66a94ad261e2318d80b3e0d363894a79df2b67"}, + {file = "importlib_metadata-8.3.0.tar.gz", hash = "sha256:9c8fa6e8ea0f9516ad5c8db9246a731c948193c7754d3babb0114a05b27dd364"}, ] [package.dependencies] @@ -1848,6 +1863,56 @@ tokenizers = "*" extra-proxy = ["azure-identity (>=1.15.0,<2.0.0)", "azure-keyvault-secrets (>=4.8.0,<5.0.0)", "google-cloud-kms (>=2.21.3,<3.0.0)", "prisma (==0.11.0)", "pynacl (>=1.5.0,<2.0.0)", "resend (>=0.8.0,<0.9.0)"] proxy = ["PyJWT (>=2.8.0,<3.0.0)", "apscheduler (>=3.10.4,<4.0.0)", "backoff", "cryptography (>=42.0.5,<43.0.0)", "fastapi (>=0.111.0,<0.112.0)", "fastapi-sso (>=0.10.0,<0.11.0)", "gunicorn (>=22.0.0,<23.0.0)", "orjson (>=3.9.7,<4.0.0)", "python-multipart (>=0.0.9,<0.0.10)", "pyyaml (>=6.0.1,<7.0.0)", "rq", "uvicorn (>=0.22.0,<0.23.0)"] +[[package]] +name = "lz4" +version = "4.3.3" +description = "LZ4 Bindings for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "lz4-4.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b891880c187e96339474af2a3b2bfb11a8e4732ff5034be919aa9029484cd201"}, + {file = "lz4-4.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:222a7e35137d7539c9c33bb53fcbb26510c5748779364014235afc62b0ec797f"}, + {file = "lz4-4.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f76176492ff082657ada0d0f10c794b6da5800249ef1692b35cf49b1e93e8ef7"}, + {file = "lz4-4.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1d18718f9d78182c6b60f568c9a9cec8a7204d7cb6fad4e511a2ef279e4cb05"}, + {file = "lz4-4.3.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6cdc60e21ec70266947a48839b437d46025076eb4b12c76bd47f8e5eb8a75dcc"}, + {file = "lz4-4.3.3-cp310-cp310-win32.whl", hash = "sha256:c81703b12475da73a5d66618856d04b1307e43428a7e59d98cfe5a5d608a74c6"}, + {file = "lz4-4.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:43cf03059c0f941b772c8aeb42a0813d68d7081c009542301637e5782f8a33e2"}, + {file = "lz4-4.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30e8c20b8857adef7be045c65f47ab1e2c4fabba86a9fa9a997d7674a31ea6b6"}, + {file = "lz4-4.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2f7b1839f795315e480fb87d9bc60b186a98e3e5d17203c6e757611ef7dcef61"}, + {file = "lz4-4.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edfd858985c23523f4e5a7526ca6ee65ff930207a7ec8a8f57a01eae506aaee7"}, + {file = "lz4-4.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e9c410b11a31dbdc94c05ac3c480cb4b222460faf9231f12538d0074e56c563"}, + {file = "lz4-4.3.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d2507ee9c99dbddd191c86f0e0c8b724c76d26b0602db9ea23232304382e1f21"}, + {file = "lz4-4.3.3-cp311-cp311-win32.whl", hash = "sha256:f180904f33bdd1e92967923a43c22899e303906d19b2cf8bb547db6653ea6e7d"}, + {file = "lz4-4.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:b14d948e6dce389f9a7afc666d60dd1e35fa2138a8ec5306d30cd2e30d36b40c"}, + {file = "lz4-4.3.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e36cd7b9d4d920d3bfc2369840da506fa68258f7bb176b8743189793c055e43d"}, + {file = "lz4-4.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:31ea4be9d0059c00b2572d700bf2c1bc82f241f2c3282034a759c9a4d6ca4dc2"}, + {file = "lz4-4.3.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33c9a6fd20767ccaf70649982f8f3eeb0884035c150c0b818ea660152cf3c809"}, + {file = "lz4-4.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bca8fccc15e3add173da91be8f34121578dc777711ffd98d399be35487c934bf"}, + {file = "lz4-4.3.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7d84b479ddf39fe3ea05387f10b779155fc0990125f4fb35d636114e1c63a2e"}, + {file = "lz4-4.3.3-cp312-cp312-win32.whl", hash = "sha256:337cb94488a1b060ef1685187d6ad4ba8bc61d26d631d7ba909ee984ea736be1"}, + {file = "lz4-4.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:5d35533bf2cee56f38ced91f766cd0038b6abf46f438a80d50c52750088be93f"}, + {file = "lz4-4.3.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:363ab65bf31338eb364062a15f302fc0fab0a49426051429866d71c793c23394"}, + {file = "lz4-4.3.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0a136e44a16fc98b1abc404fbabf7f1fada2bdab6a7e970974fb81cf55b636d0"}, + {file = "lz4-4.3.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abc197e4aca8b63f5ae200af03eb95fb4b5055a8f990079b5bdf042f568469dd"}, + {file = "lz4-4.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56f4fe9c6327adb97406f27a66420b22ce02d71a5c365c48d6b656b4aaeb7775"}, + {file = "lz4-4.3.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0e822cd7644995d9ba248cb4b67859701748a93e2ab7fc9bc18c599a52e4604"}, + {file = "lz4-4.3.3-cp38-cp38-win32.whl", hash = "sha256:24b3206de56b7a537eda3a8123c644a2b7bf111f0af53bc14bed90ce5562d1aa"}, + {file = "lz4-4.3.3-cp38-cp38-win_amd64.whl", hash = "sha256:b47839b53956e2737229d70714f1d75f33e8ac26e52c267f0197b3189ca6de24"}, + {file = "lz4-4.3.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6756212507405f270b66b3ff7f564618de0606395c0fe10a7ae2ffcbbe0b1fba"}, + {file = "lz4-4.3.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee9ff50557a942d187ec85462bb0960207e7ec5b19b3b48949263993771c6205"}, + {file = "lz4-4.3.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2b901c7784caac9a1ded4555258207d9e9697e746cc8532129f150ffe1f6ba0d"}, + {file = "lz4-4.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6d9ec061b9eca86e4dcc003d93334b95d53909afd5a32c6e4f222157b50c071"}, + {file = "lz4-4.3.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4c7bf687303ca47d69f9f0133274958fd672efaa33fb5bcde467862d6c621f0"}, + {file = "lz4-4.3.3-cp39-cp39-win32.whl", hash = "sha256:054b4631a355606e99a42396f5db4d22046a3397ffc3269a348ec41eaebd69d2"}, + {file = "lz4-4.3.3-cp39-cp39-win_amd64.whl", hash = "sha256:eac9af361e0d98335a02ff12fb56caeb7ea1196cf1a49dbf6f17828a131da807"}, + {file = "lz4-4.3.3.tar.gz", hash = "sha256:01fe674ef2889dbb9899d8a67361e0c4a2c833af5aeb37dd505727cf5d2a131e"}, +] + +[package.extras] +docs = ["sphinx (>=1.6.0)", "sphinx-bootstrap-theme"] +flake8 = ["flake8"] +tests = ["psutil", "pytest (!=3.3.0)", "pytest-cov"] + [[package]] name = "markdown-it-py" version = "3.0.0" @@ -2374,13 +2439,13 @@ files = [ [[package]] name = "openai" -version = "1.41.0" +version = "1.41.1" description = "The official Python library for the openai API" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-1.41.0-py3-none-any.whl", hash = "sha256:3b6cca4571667f3e0800442ef8f2bfa6a6f3301c51776bc7626159a4d81c242c"}, - {file = "openai-1.41.0.tar.gz", hash = "sha256:26b81f39b49dce92ff5d30c373625ddb212c2f1050e1574e456d18423730cdd0"}, + {file = "openai-1.41.1-py3-none-any.whl", hash = "sha256:56fb04105263f79559aff3ceea2e1dd16f8c5385e8238cb66cf0e6888fa8bfcf"}, + {file = "openai-1.41.1.tar.gz", hash = "sha256:e38e376efd91e0d4db071e2a6517b6b4cac1c2a6fd63efdc5ec6be10c5967c1b"}, ] [package.dependencies] @@ -3635,19 +3700,19 @@ tornado = ["tornado (>=6)"] [[package]] name = "setuptools" -version = "72.2.0" +version = "73.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-72.2.0-py3-none-any.whl", hash = "sha256:f11dd94b7bae3a156a95ec151f24e4637fb4fa19c878e4d191bfb8b2d82728c4"}, - {file = "setuptools-72.2.0.tar.gz", hash = "sha256:80aacbf633704e9c8bfa1d99fa5dd4dc59573efcf9e4042c13d3bcef91ac2ef9"}, + {file = "setuptools-73.0.0-py3-none-any.whl", hash = "sha256:f2bfcce7ae1784d90b04c57c2802e8649e1976530bb25dc72c2b078d3ecf4864"}, + {file = "setuptools-73.0.0.tar.gz", hash = "sha256:3c08705fadfc8c7c445cf4d98078f0fafb9225775b2b4e8447e40348f82597c0"}, ] [package.extras] -core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "ordered-set (>=3.1.1)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] +core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] [[package]] name = "shellingham" @@ -4419,4 +4484,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.12" -content-hash = "9ba28e1010a979afba89f2fa3924462e004f7f1bdf4e3a4a839b96241df04856" +content-hash = "d0445b363a8642838c50a25b5f9e440e1defca471cb3bf547e800a44dc9fe083" diff --git a/agents-api/pyproject.toml b/agents-api/pyproject.toml index e27a2c1f9..59111206f 100644 --- a/agents-api/pyproject.toml +++ b/agents-api/pyproject.toml @@ -30,6 +30,7 @@ tenacity = "^9.0.0" beartype = "^0.18.5" pydantic-partial = "^0.5.5" simpleeval = "^0.9.13" +lz4 = "^4.3.3" [tool.poetry.group.dev.dependencies] ipython = "^8.26.0" @@ -66,9 +67,12 @@ datamodel-codegen \ --input-file-type openapi \ --output agents_api/autogen/ \ --output-model-type pydantic_v2.BaseModel \ + --strict-types bool \ --strict-nullable \ --allow-population-by-field-name \ + --allow-extra-fields \ --field-include-all-keys \ + --snake-case-field \ --enum-field-as-literal all \ --field-constraints \ --reuse-model \ @@ -86,7 +90,7 @@ datamodel-codegen \ --use-standard-collections \ --use-non-positive-negative-number-constrained-types \ --collapse-root-models \ - --target-python-version 3.10 \ + --target-python-version 3.11 \ --openapi-scopes schemas \ --keep-model-order \ --disable-timestamp""" diff --git a/agents-api/tests/utils.py b/agents-api/tests/utils.py index cebe84a1c..b15332300 100644 --- a/agents-api/tests/utils.py +++ b/agents-api/tests/utils.py @@ -23,9 +23,6 @@ async def patch_testing_temporal(): async with await WorkflowEnvironment.start_time_skipping( data_converter=pydantic_data_converter ) as env: - # # Set the correct codec - # env.client._config["data_converter"] = pydantic_data_converter - # Create a worker with our workflows and start it worker = create_worker(client=env.client) asyncio.create_task(worker.run()) diff --git a/scripts/generate_openapi_code.sh b/scripts/generate_openapi_code.sh index 8ea3acf8f..1c1d22476 100755 --- a/scripts/generate_openapi_code.sh +++ b/scripts/generate_openapi_code.sh @@ -3,6 +3,9 @@ # Turn on echo command set -x +# Exit on error +set -e + cd typespec/ && \ tsp compile . cd - diff --git a/sdks/python/julep/api/__init__.py b/sdks/python/julep/api/__init__.py index 5f56e7611..c570a4827 100644 --- a/sdks/python/julep/api/__init__.py +++ b/sdks/python/julep/api/__init__.py @@ -145,6 +145,19 @@ TasksBaseWorkflowStep_Yield, TasksCaseThen, TasksCaseThenThen, + TasksCaseThenThen_Embed, + TasksCaseThenThen_Error, + TasksCaseThenThen_Evaluate, + TasksCaseThenThen_Get, + TasksCaseThenThen_Log, + TasksCaseThenThen_Prompt, + TasksCaseThenThen_Return, + TasksCaseThenThen_Search, + TasksCaseThenThen_Set, + TasksCaseThenThen_Sleep, + TasksCaseThenThen_ToolCall, + TasksCaseThenThen_WaitForInput, + TasksCaseThenThen_Yield, TasksCreateTaskRequest, TasksCreateTaskRequestMainItem, TasksCreateTaskRequestMainItem_Embed, @@ -170,16 +183,68 @@ TasksEvaluateStep, TasksForeachDo, TasksForeachDoDo, + TasksForeachDoDo_Embed, + TasksForeachDoDo_Error, + TasksForeachDoDo_Evaluate, + TasksForeachDoDo_Get, + TasksForeachDoDo_Log, + TasksForeachDoDo_Prompt, + TasksForeachDoDo_Return, + TasksForeachDoDo_Search, + TasksForeachDoDo_Set, + TasksForeachDoDo_Sleep, + TasksForeachDoDo_ToolCall, + TasksForeachDoDo_WaitForInput, + TasksForeachDoDo_Yield, TasksForeachStep, TasksGetStep, TasksIfElseWorkflowStep, TasksIfElseWorkflowStepElse, + TasksIfElseWorkflowStepElse_Embed, + TasksIfElseWorkflowStepElse_Error, + TasksIfElseWorkflowStepElse_Evaluate, + TasksIfElseWorkflowStepElse_Get, + TasksIfElseWorkflowStepElse_Log, + TasksIfElseWorkflowStepElse_Prompt, + TasksIfElseWorkflowStepElse_Return, + TasksIfElseWorkflowStepElse_Search, + TasksIfElseWorkflowStepElse_Set, + TasksIfElseWorkflowStepElse_Sleep, + TasksIfElseWorkflowStepElse_ToolCall, + TasksIfElseWorkflowStepElse_WaitForInput, + TasksIfElseWorkflowStepElse_Yield, TasksIfElseWorkflowStepThen, + TasksIfElseWorkflowStepThen_Embed, + TasksIfElseWorkflowStepThen_Error, + TasksIfElseWorkflowStepThen_Evaluate, + TasksIfElseWorkflowStepThen_Get, + TasksIfElseWorkflowStepThen_Log, + TasksIfElseWorkflowStepThen_Prompt, + TasksIfElseWorkflowStepThen_Return, + TasksIfElseWorkflowStepThen_Search, + TasksIfElseWorkflowStepThen_Set, + TasksIfElseWorkflowStepThen_Sleep, + TasksIfElseWorkflowStepThen_ToolCall, + TasksIfElseWorkflowStepThen_WaitForInput, + TasksIfElseWorkflowStepThen_Yield, TasksLogStep, TasksMapOver, TasksMapReduceStep, TasksParallelStep, TasksParallelStepParallelItem, + TasksParallelStepParallelItem_Embed, + TasksParallelStepParallelItem_Error, + TasksParallelStepParallelItem_Evaluate, + TasksParallelStepParallelItem_Get, + TasksParallelStepParallelItem_Log, + TasksParallelStepParallelItem_Prompt, + TasksParallelStepParallelItem_Return, + TasksParallelStepParallelItem_Search, + TasksParallelStepParallelItem_Set, + TasksParallelStepParallelItem_Sleep, + TasksParallelStepParallelItem_ToolCall, + TasksParallelStepParallelItem_WaitForInput, + TasksParallelStepParallelItem_Yield, TasksPatchTaskRequestMainItem, TasksPatchTaskRequestMainItem_Embed, TasksPatchTaskRequestMainItem_Error, @@ -429,6 +494,19 @@ "TasksBaseWorkflowStep_Yield", "TasksCaseThen", "TasksCaseThenThen", + "TasksCaseThenThen_Embed", + "TasksCaseThenThen_Error", + "TasksCaseThenThen_Evaluate", + "TasksCaseThenThen_Get", + "TasksCaseThenThen_Log", + "TasksCaseThenThen_Prompt", + "TasksCaseThenThen_Return", + "TasksCaseThenThen_Search", + "TasksCaseThenThen_Set", + "TasksCaseThenThen_Sleep", + "TasksCaseThenThen_ToolCall", + "TasksCaseThenThen_WaitForInput", + "TasksCaseThenThen_Yield", "TasksCreateTaskRequest", "TasksCreateTaskRequestMainItem", "TasksCreateTaskRequestMainItem_Embed", @@ -454,16 +532,68 @@ "TasksEvaluateStep", "TasksForeachDo", "TasksForeachDoDo", + "TasksForeachDoDo_Embed", + "TasksForeachDoDo_Error", + "TasksForeachDoDo_Evaluate", + "TasksForeachDoDo_Get", + "TasksForeachDoDo_Log", + "TasksForeachDoDo_Prompt", + "TasksForeachDoDo_Return", + "TasksForeachDoDo_Search", + "TasksForeachDoDo_Set", + "TasksForeachDoDo_Sleep", + "TasksForeachDoDo_ToolCall", + "TasksForeachDoDo_WaitForInput", + "TasksForeachDoDo_Yield", "TasksForeachStep", "TasksGetStep", "TasksIfElseWorkflowStep", "TasksIfElseWorkflowStepElse", + "TasksIfElseWorkflowStepElse_Embed", + "TasksIfElseWorkflowStepElse_Error", + "TasksIfElseWorkflowStepElse_Evaluate", + "TasksIfElseWorkflowStepElse_Get", + "TasksIfElseWorkflowStepElse_Log", + "TasksIfElseWorkflowStepElse_Prompt", + "TasksIfElseWorkflowStepElse_Return", + "TasksIfElseWorkflowStepElse_Search", + "TasksIfElseWorkflowStepElse_Set", + "TasksIfElseWorkflowStepElse_Sleep", + "TasksIfElseWorkflowStepElse_ToolCall", + "TasksIfElseWorkflowStepElse_WaitForInput", + "TasksIfElseWorkflowStepElse_Yield", "TasksIfElseWorkflowStepThen", + "TasksIfElseWorkflowStepThen_Embed", + "TasksIfElseWorkflowStepThen_Error", + "TasksIfElseWorkflowStepThen_Evaluate", + "TasksIfElseWorkflowStepThen_Get", + "TasksIfElseWorkflowStepThen_Log", + "TasksIfElseWorkflowStepThen_Prompt", + "TasksIfElseWorkflowStepThen_Return", + "TasksIfElseWorkflowStepThen_Search", + "TasksIfElseWorkflowStepThen_Set", + "TasksIfElseWorkflowStepThen_Sleep", + "TasksIfElseWorkflowStepThen_ToolCall", + "TasksIfElseWorkflowStepThen_WaitForInput", + "TasksIfElseWorkflowStepThen_Yield", "TasksLogStep", "TasksMapOver", "TasksMapReduceStep", "TasksParallelStep", "TasksParallelStepParallelItem", + "TasksParallelStepParallelItem_Embed", + "TasksParallelStepParallelItem_Error", + "TasksParallelStepParallelItem_Evaluate", + "TasksParallelStepParallelItem_Get", + "TasksParallelStepParallelItem_Log", + "TasksParallelStepParallelItem_Prompt", + "TasksParallelStepParallelItem_Return", + "TasksParallelStepParallelItem_Search", + "TasksParallelStepParallelItem_Set", + "TasksParallelStepParallelItem_Sleep", + "TasksParallelStepParallelItem_ToolCall", + "TasksParallelStepParallelItem_WaitForInput", + "TasksParallelStepParallelItem_Yield", "TasksPatchTaskRequestMainItem", "TasksPatchTaskRequestMainItem_Embed", "TasksPatchTaskRequestMainItem_Error", diff --git a/sdks/python/julep/api/types/__init__.py b/sdks/python/julep/api/types/__init__.py index 351c3ff7d..b1aead7fe 100644 --- a/sdks/python/julep/api/types/__init__.py +++ b/sdks/python/julep/api/types/__init__.py @@ -181,7 +181,22 @@ TasksBaseWorkflowStep_Yield, ) from .tasks_case_then import TasksCaseThen -from .tasks_case_then_then import TasksCaseThenThen +from .tasks_case_then_then import ( + TasksCaseThenThen, + TasksCaseThenThen_Embed, + TasksCaseThenThen_Error, + TasksCaseThenThen_Evaluate, + TasksCaseThenThen_Get, + TasksCaseThenThen_Log, + TasksCaseThenThen_Prompt, + TasksCaseThenThen_Return, + TasksCaseThenThen_Search, + TasksCaseThenThen_Set, + TasksCaseThenThen_Sleep, + TasksCaseThenThen_ToolCall, + TasksCaseThenThen_WaitForInput, + TasksCaseThenThen_Yield, +) from .tasks_create_task_request import TasksCreateTaskRequest from .tasks_create_task_request_main_item import ( TasksCreateTaskRequestMainItem, @@ -208,17 +223,77 @@ from .tasks_error_workflow_step import TasksErrorWorkflowStep from .tasks_evaluate_step import TasksEvaluateStep from .tasks_foreach_do import TasksForeachDo -from .tasks_foreach_do_do import TasksForeachDoDo +from .tasks_foreach_do_do import ( + TasksForeachDoDo, + TasksForeachDoDo_Embed, + TasksForeachDoDo_Error, + TasksForeachDoDo_Evaluate, + TasksForeachDoDo_Get, + TasksForeachDoDo_Log, + TasksForeachDoDo_Prompt, + TasksForeachDoDo_Return, + TasksForeachDoDo_Search, + TasksForeachDoDo_Set, + TasksForeachDoDo_Sleep, + TasksForeachDoDo_ToolCall, + TasksForeachDoDo_WaitForInput, + TasksForeachDoDo_Yield, +) from .tasks_foreach_step import TasksForeachStep from .tasks_get_step import TasksGetStep from .tasks_if_else_workflow_step import TasksIfElseWorkflowStep -from .tasks_if_else_workflow_step_else import TasksIfElseWorkflowStepElse -from .tasks_if_else_workflow_step_then import TasksIfElseWorkflowStepThen +from .tasks_if_else_workflow_step_else import ( + TasksIfElseWorkflowStepElse, + TasksIfElseWorkflowStepElse_Embed, + TasksIfElseWorkflowStepElse_Error, + TasksIfElseWorkflowStepElse_Evaluate, + TasksIfElseWorkflowStepElse_Get, + TasksIfElseWorkflowStepElse_Log, + TasksIfElseWorkflowStepElse_Prompt, + TasksIfElseWorkflowStepElse_Return, + TasksIfElseWorkflowStepElse_Search, + TasksIfElseWorkflowStepElse_Set, + TasksIfElseWorkflowStepElse_Sleep, + TasksIfElseWorkflowStepElse_ToolCall, + TasksIfElseWorkflowStepElse_WaitForInput, + TasksIfElseWorkflowStepElse_Yield, +) +from .tasks_if_else_workflow_step_then import ( + TasksIfElseWorkflowStepThen, + TasksIfElseWorkflowStepThen_Embed, + TasksIfElseWorkflowStepThen_Error, + TasksIfElseWorkflowStepThen_Evaluate, + TasksIfElseWorkflowStepThen_Get, + TasksIfElseWorkflowStepThen_Log, + TasksIfElseWorkflowStepThen_Prompt, + TasksIfElseWorkflowStepThen_Return, + TasksIfElseWorkflowStepThen_Search, + TasksIfElseWorkflowStepThen_Set, + TasksIfElseWorkflowStepThen_Sleep, + TasksIfElseWorkflowStepThen_ToolCall, + TasksIfElseWorkflowStepThen_WaitForInput, + TasksIfElseWorkflowStepThen_Yield, +) from .tasks_log_step import TasksLogStep from .tasks_map_over import TasksMapOver from .tasks_map_reduce_step import TasksMapReduceStep from .tasks_parallel_step import TasksParallelStep -from .tasks_parallel_step_parallel_item import TasksParallelStepParallelItem +from .tasks_parallel_step_parallel_item import ( + TasksParallelStepParallelItem, + TasksParallelStepParallelItem_Embed, + TasksParallelStepParallelItem_Error, + TasksParallelStepParallelItem_Evaluate, + TasksParallelStepParallelItem_Get, + TasksParallelStepParallelItem_Log, + TasksParallelStepParallelItem_Prompt, + TasksParallelStepParallelItem_Return, + TasksParallelStepParallelItem_Search, + TasksParallelStepParallelItem_Set, + TasksParallelStepParallelItem_Sleep, + TasksParallelStepParallelItem_ToolCall, + TasksParallelStepParallelItem_WaitForInput, + TasksParallelStepParallelItem_Yield, +) from .tasks_patch_task_request_main_item import ( TasksPatchTaskRequestMainItem, TasksPatchTaskRequestMainItem_Embed, @@ -470,6 +545,19 @@ "TasksBaseWorkflowStep_Yield", "TasksCaseThen", "TasksCaseThenThen", + "TasksCaseThenThen_Embed", + "TasksCaseThenThen_Error", + "TasksCaseThenThen_Evaluate", + "TasksCaseThenThen_Get", + "TasksCaseThenThen_Log", + "TasksCaseThenThen_Prompt", + "TasksCaseThenThen_Return", + "TasksCaseThenThen_Search", + "TasksCaseThenThen_Set", + "TasksCaseThenThen_Sleep", + "TasksCaseThenThen_ToolCall", + "TasksCaseThenThen_WaitForInput", + "TasksCaseThenThen_Yield", "TasksCreateTaskRequest", "TasksCreateTaskRequestMainItem", "TasksCreateTaskRequestMainItem_Embed", @@ -495,16 +583,68 @@ "TasksEvaluateStep", "TasksForeachDo", "TasksForeachDoDo", + "TasksForeachDoDo_Embed", + "TasksForeachDoDo_Error", + "TasksForeachDoDo_Evaluate", + "TasksForeachDoDo_Get", + "TasksForeachDoDo_Log", + "TasksForeachDoDo_Prompt", + "TasksForeachDoDo_Return", + "TasksForeachDoDo_Search", + "TasksForeachDoDo_Set", + "TasksForeachDoDo_Sleep", + "TasksForeachDoDo_ToolCall", + "TasksForeachDoDo_WaitForInput", + "TasksForeachDoDo_Yield", "TasksForeachStep", "TasksGetStep", "TasksIfElseWorkflowStep", "TasksIfElseWorkflowStepElse", + "TasksIfElseWorkflowStepElse_Embed", + "TasksIfElseWorkflowStepElse_Error", + "TasksIfElseWorkflowStepElse_Evaluate", + "TasksIfElseWorkflowStepElse_Get", + "TasksIfElseWorkflowStepElse_Log", + "TasksIfElseWorkflowStepElse_Prompt", + "TasksIfElseWorkflowStepElse_Return", + "TasksIfElseWorkflowStepElse_Search", + "TasksIfElseWorkflowStepElse_Set", + "TasksIfElseWorkflowStepElse_Sleep", + "TasksIfElseWorkflowStepElse_ToolCall", + "TasksIfElseWorkflowStepElse_WaitForInput", + "TasksIfElseWorkflowStepElse_Yield", "TasksIfElseWorkflowStepThen", + "TasksIfElseWorkflowStepThen_Embed", + "TasksIfElseWorkflowStepThen_Error", + "TasksIfElseWorkflowStepThen_Evaluate", + "TasksIfElseWorkflowStepThen_Get", + "TasksIfElseWorkflowStepThen_Log", + "TasksIfElseWorkflowStepThen_Prompt", + "TasksIfElseWorkflowStepThen_Return", + "TasksIfElseWorkflowStepThen_Search", + "TasksIfElseWorkflowStepThen_Set", + "TasksIfElseWorkflowStepThen_Sleep", + "TasksIfElseWorkflowStepThen_ToolCall", + "TasksIfElseWorkflowStepThen_WaitForInput", + "TasksIfElseWorkflowStepThen_Yield", "TasksLogStep", "TasksMapOver", "TasksMapReduceStep", "TasksParallelStep", "TasksParallelStepParallelItem", + "TasksParallelStepParallelItem_Embed", + "TasksParallelStepParallelItem_Error", + "TasksParallelStepParallelItem_Evaluate", + "TasksParallelStepParallelItem_Get", + "TasksParallelStepParallelItem_Log", + "TasksParallelStepParallelItem_Prompt", + "TasksParallelStepParallelItem_Return", + "TasksParallelStepParallelItem_Search", + "TasksParallelStepParallelItem_Set", + "TasksParallelStepParallelItem_Sleep", + "TasksParallelStepParallelItem_ToolCall", + "TasksParallelStepParallelItem_WaitForInput", + "TasksParallelStepParallelItem_Yield", "TasksPatchTaskRequestMainItem", "TasksPatchTaskRequestMainItem_Embed", "TasksPatchTaskRequestMainItem_Error", diff --git a/sdks/python/julep/api/types/tasks_base_workflow_step.py b/sdks/python/julep/api/types/tasks_base_workflow_step.py index 3a3c9062c..f6798a97a 100644 --- a/sdks/python/julep/api/types/tasks_base_workflow_step.py +++ b/sdks/python/julep/api/types/tasks_base_workflow_step.py @@ -25,7 +25,7 @@ class TasksBaseWorkflowStep_ToolCall(pydantic_v1.BaseModel): tool: CommonToolRef - arguments: typing.Dict[str, typing.Any] + arguments: typing.Dict[str, CommonPyExpression] kind: typing.Literal["tool_call"] = pydantic_v1.Field( alias="kind_", default="tool_call" ) diff --git a/sdks/python/julep/api/types/tasks_case_then_then.py b/sdks/python/julep/api/types/tasks_case_then_then.py index 3680b8720..58be8eaab 100644 --- a/sdks/python/julep/api/types/tasks_case_then_then.py +++ b/sdks/python/julep/api/types/tasks_case_then_then.py @@ -1,32 +1,589 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import datetime as dt import typing -from .tasks_embed_step import TasksEmbedStep -from .tasks_error_workflow_step import TasksErrorWorkflowStep -from .tasks_get_step import TasksGetStep -from .tasks_log_step import TasksLogStep -from .tasks_prompt_step import TasksPromptStep -from .tasks_return_step import TasksReturnStep -from .tasks_search_step import TasksSearchStep -from .tasks_set_step import TasksSetStep -from .tasks_sleep_step import TasksSleepStep -from .tasks_tool_call_step import TasksToolCallStep -from .tasks_wait_for_input_step import TasksWaitForInputStep -from .tasks_yield_step import TasksYieldStep +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .chat_chat_settings import ChatChatSettings +from .common_py_expression import CommonPyExpression +from .common_tool_ref import CommonToolRef +from .docs_embed_query_request import DocsEmbedQueryRequest +from .tasks_prompt_step_prompt import TasksPromptStepPrompt +from .tasks_search_step_search import TasksSearchStepSearch +from .tasks_set_step_set import TasksSetStepSet +from .tasks_sleep_for import TasksSleepFor + + +class TasksCaseThenThen_Evaluate(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + evaluate: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["evaluate"] = pydantic_v1.Field( + alias="kind_", default="evaluate" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_ToolCall(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + tool: CommonToolRef + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["tool_call"] = pydantic_v1.Field( + alias="kind_", default="tool_call" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Yield(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + workflow: str + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["yield"] = pydantic_v1.Field(alias="kind_", default="yield") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Prompt(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + prompt: TasksPromptStepPrompt + settings: ChatChatSettings + kind: typing.Literal["prompt"] = pydantic_v1.Field(alias="kind_", default="prompt") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Error(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + error: str + kind: typing.Literal["error"] = pydantic_v1.Field(alias="kind_", default="error") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Sleep(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + sleep: TasksSleepFor + kind: typing.Literal["sleep"] = pydantic_v1.Field(alias="kind_", default="sleep") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Return(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + return_: typing.Dict[str, CommonPyExpression] = pydantic_v1.Field(alias="return") + kind: typing.Literal["return"] = pydantic_v1.Field(alias="kind_", default="return") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Get(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + get: str + kind: typing.Literal["get"] = pydantic_v1.Field(alias="kind_", default="get") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Set(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + set_: TasksSetStepSet = pydantic_v1.Field(alias="set") + kind: typing.Literal["set"] = pydantic_v1.Field(alias="kind_", default="set") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Log(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + log: CommonPyExpression + kind: typing.Literal["log"] = pydantic_v1.Field(alias="kind_", default="log") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Embed(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + embed: DocsEmbedQueryRequest + kind: typing.Literal["embed"] = pydantic_v1.Field(alias="kind_", default="embed") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_Search(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + search: TasksSearchStepSearch + kind: typing.Literal["search"] = pydantic_v1.Field(alias="kind_", default="search") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksCaseThenThen_WaitForInput(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + wait_for_input: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["wait_for_input"] = pydantic_v1.Field( + alias="kind_", default="wait_for_input" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + TasksCaseThenThen = typing.Union[ - typing.Any, - TasksToolCallStep, - TasksYieldStep, - TasksPromptStep, - TasksErrorWorkflowStep, - TasksSleepStep, - TasksReturnStep, - TasksGetStep, - TasksSetStep, - TasksLogStep, - TasksEmbedStep, - TasksSearchStep, - TasksWaitForInputStep, + TasksCaseThenThen_Evaluate, + TasksCaseThenThen_ToolCall, + TasksCaseThenThen_Yield, + TasksCaseThenThen_Prompt, + TasksCaseThenThen_Error, + TasksCaseThenThen_Sleep, + TasksCaseThenThen_Return, + TasksCaseThenThen_Get, + TasksCaseThenThen_Set, + TasksCaseThenThen_Log, + TasksCaseThenThen_Embed, + TasksCaseThenThen_Search, + TasksCaseThenThen_WaitForInput, ] diff --git a/sdks/python/julep/api/types/tasks_create_task_request_main_item.py b/sdks/python/julep/api/types/tasks_create_task_request_main_item.py index ba5929b30..64a8f1a98 100644 --- a/sdks/python/julep/api/types/tasks_create_task_request_main_item.py +++ b/sdks/python/julep/api/types/tasks_create_task_request_main_item.py @@ -65,7 +65,7 @@ class Config: class TasksCreateTaskRequestMainItem_ToolCall(pydantic_v1.BaseModel): tool: CommonToolRef - arguments: typing.Dict[str, typing.Any] + arguments: typing.Dict[str, CommonPyExpression] kind: typing.Literal["tool_call"] = pydantic_v1.Field( alias="kind_", default="tool_call" ) diff --git a/sdks/python/julep/api/types/tasks_foreach_do_do.py b/sdks/python/julep/api/types/tasks_foreach_do_do.py index 9e4baf072..90979bb54 100644 --- a/sdks/python/julep/api/types/tasks_foreach_do_do.py +++ b/sdks/python/julep/api/types/tasks_foreach_do_do.py @@ -1,32 +1,589 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import datetime as dt import typing -from .tasks_embed_step import TasksEmbedStep -from .tasks_error_workflow_step import TasksErrorWorkflowStep -from .tasks_get_step import TasksGetStep -from .tasks_log_step import TasksLogStep -from .tasks_prompt_step import TasksPromptStep -from .tasks_return_step import TasksReturnStep -from .tasks_search_step import TasksSearchStep -from .tasks_set_step import TasksSetStep -from .tasks_sleep_step import TasksSleepStep -from .tasks_tool_call_step import TasksToolCallStep -from .tasks_wait_for_input_step import TasksWaitForInputStep -from .tasks_yield_step import TasksYieldStep +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .chat_chat_settings import ChatChatSettings +from .common_py_expression import CommonPyExpression +from .common_tool_ref import CommonToolRef +from .docs_embed_query_request import DocsEmbedQueryRequest +from .tasks_prompt_step_prompt import TasksPromptStepPrompt +from .tasks_search_step_search import TasksSearchStepSearch +from .tasks_set_step_set import TasksSetStepSet +from .tasks_sleep_for import TasksSleepFor + + +class TasksForeachDoDo_Evaluate(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + evaluate: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["evaluate"] = pydantic_v1.Field( + alias="kind_", default="evaluate" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_ToolCall(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + tool: CommonToolRef + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["tool_call"] = pydantic_v1.Field( + alias="kind_", default="tool_call" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Yield(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + workflow: str + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["yield"] = pydantic_v1.Field(alias="kind_", default="yield") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Prompt(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + prompt: TasksPromptStepPrompt + settings: ChatChatSettings + kind: typing.Literal["prompt"] = pydantic_v1.Field(alias="kind_", default="prompt") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Error(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + error: str + kind: typing.Literal["error"] = pydantic_v1.Field(alias="kind_", default="error") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Sleep(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + sleep: TasksSleepFor + kind: typing.Literal["sleep"] = pydantic_v1.Field(alias="kind_", default="sleep") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Return(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + return_: typing.Dict[str, CommonPyExpression] = pydantic_v1.Field(alias="return") + kind: typing.Literal["return"] = pydantic_v1.Field(alias="kind_", default="return") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Get(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + get: str + kind: typing.Literal["get"] = pydantic_v1.Field(alias="kind_", default="get") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Set(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + set_: TasksSetStepSet = pydantic_v1.Field(alias="set") + kind: typing.Literal["set"] = pydantic_v1.Field(alias="kind_", default="set") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Log(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + log: CommonPyExpression + kind: typing.Literal["log"] = pydantic_v1.Field(alias="kind_", default="log") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Embed(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + embed: DocsEmbedQueryRequest + kind: typing.Literal["embed"] = pydantic_v1.Field(alias="kind_", default="embed") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_Search(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + search: TasksSearchStepSearch + kind: typing.Literal["search"] = pydantic_v1.Field(alias="kind_", default="search") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksForeachDoDo_WaitForInput(pydantic_v1.BaseModel): + """ + The steps to run for each iteration + """ + + wait_for_input: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["wait_for_input"] = pydantic_v1.Field( + alias="kind_", default="wait_for_input" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + TasksForeachDoDo = typing.Union[ - typing.Any, - TasksToolCallStep, - TasksYieldStep, - TasksPromptStep, - TasksErrorWorkflowStep, - TasksSleepStep, - TasksReturnStep, - TasksGetStep, - TasksSetStep, - TasksLogStep, - TasksEmbedStep, - TasksSearchStep, - TasksWaitForInputStep, + TasksForeachDoDo_Evaluate, + TasksForeachDoDo_ToolCall, + TasksForeachDoDo_Yield, + TasksForeachDoDo_Prompt, + TasksForeachDoDo_Error, + TasksForeachDoDo_Sleep, + TasksForeachDoDo_Return, + TasksForeachDoDo_Get, + TasksForeachDoDo_Set, + TasksForeachDoDo_Log, + TasksForeachDoDo_Embed, + TasksForeachDoDo_Search, + TasksForeachDoDo_WaitForInput, ] diff --git a/sdks/python/julep/api/types/tasks_if_else_workflow_step_else.py b/sdks/python/julep/api/types/tasks_if_else_workflow_step_else.py index 754449134..4f3cf5111 100644 --- a/sdks/python/julep/api/types/tasks_if_else_workflow_step_else.py +++ b/sdks/python/julep/api/types/tasks_if_else_workflow_step_else.py @@ -1,32 +1,589 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import datetime as dt import typing -from .tasks_embed_step import TasksEmbedStep -from .tasks_error_workflow_step import TasksErrorWorkflowStep -from .tasks_get_step import TasksGetStep -from .tasks_log_step import TasksLogStep -from .tasks_prompt_step import TasksPromptStep -from .tasks_return_step import TasksReturnStep -from .tasks_search_step import TasksSearchStep -from .tasks_set_step import TasksSetStep -from .tasks_sleep_step import TasksSleepStep -from .tasks_tool_call_step import TasksToolCallStep -from .tasks_wait_for_input_step import TasksWaitForInputStep -from .tasks_yield_step import TasksYieldStep +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .chat_chat_settings import ChatChatSettings +from .common_py_expression import CommonPyExpression +from .common_tool_ref import CommonToolRef +from .docs_embed_query_request import DocsEmbedQueryRequest +from .tasks_prompt_step_prompt import TasksPromptStepPrompt +from .tasks_search_step_search import TasksSearchStepSearch +from .tasks_set_step_set import TasksSetStepSet +from .tasks_sleep_for import TasksSleepFor + + +class TasksIfElseWorkflowStepElse_Evaluate(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + evaluate: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["evaluate"] = pydantic_v1.Field( + alias="kind_", default="evaluate" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_ToolCall(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + tool: CommonToolRef + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["tool_call"] = pydantic_v1.Field( + alias="kind_", default="tool_call" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Yield(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + workflow: str + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["yield"] = pydantic_v1.Field(alias="kind_", default="yield") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Prompt(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + prompt: TasksPromptStepPrompt + settings: ChatChatSettings + kind: typing.Literal["prompt"] = pydantic_v1.Field(alias="kind_", default="prompt") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Error(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + error: str + kind: typing.Literal["error"] = pydantic_v1.Field(alias="kind_", default="error") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Sleep(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + sleep: TasksSleepFor + kind: typing.Literal["sleep"] = pydantic_v1.Field(alias="kind_", default="sleep") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Return(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + return_: typing.Dict[str, CommonPyExpression] = pydantic_v1.Field(alias="return") + kind: typing.Literal["return"] = pydantic_v1.Field(alias="kind_", default="return") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Get(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + get: str + kind: typing.Literal["get"] = pydantic_v1.Field(alias="kind_", default="get") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Set(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + set_: TasksSetStepSet = pydantic_v1.Field(alias="set") + kind: typing.Literal["set"] = pydantic_v1.Field(alias="kind_", default="set") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Log(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + log: CommonPyExpression + kind: typing.Literal["log"] = pydantic_v1.Field(alias="kind_", default="log") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Embed(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + embed: DocsEmbedQueryRequest + kind: typing.Literal["embed"] = pydantic_v1.Field(alias="kind_", default="embed") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_Search(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + search: TasksSearchStepSearch + kind: typing.Literal["search"] = pydantic_v1.Field(alias="kind_", default="search") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepElse_WaitForInput(pydantic_v1.BaseModel): + """ + The steps to run if the condition is false + """ + + wait_for_input: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["wait_for_input"] = pydantic_v1.Field( + alias="kind_", default="wait_for_input" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + TasksIfElseWorkflowStepElse = typing.Union[ - typing.Any, - TasksToolCallStep, - TasksYieldStep, - TasksPromptStep, - TasksErrorWorkflowStep, - TasksSleepStep, - TasksReturnStep, - TasksGetStep, - TasksSetStep, - TasksLogStep, - TasksEmbedStep, - TasksSearchStep, - TasksWaitForInputStep, + TasksIfElseWorkflowStepElse_Evaluate, + TasksIfElseWorkflowStepElse_ToolCall, + TasksIfElseWorkflowStepElse_Yield, + TasksIfElseWorkflowStepElse_Prompt, + TasksIfElseWorkflowStepElse_Error, + TasksIfElseWorkflowStepElse_Sleep, + TasksIfElseWorkflowStepElse_Return, + TasksIfElseWorkflowStepElse_Get, + TasksIfElseWorkflowStepElse_Set, + TasksIfElseWorkflowStepElse_Log, + TasksIfElseWorkflowStepElse_Embed, + TasksIfElseWorkflowStepElse_Search, + TasksIfElseWorkflowStepElse_WaitForInput, ] diff --git a/sdks/python/julep/api/types/tasks_if_else_workflow_step_then.py b/sdks/python/julep/api/types/tasks_if_else_workflow_step_then.py index 9e914c54d..4d760543a 100644 --- a/sdks/python/julep/api/types/tasks_if_else_workflow_step_then.py +++ b/sdks/python/julep/api/types/tasks_if_else_workflow_step_then.py @@ -1,32 +1,589 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import datetime as dt import typing -from .tasks_embed_step import TasksEmbedStep -from .tasks_error_workflow_step import TasksErrorWorkflowStep -from .tasks_get_step import TasksGetStep -from .tasks_log_step import TasksLogStep -from .tasks_prompt_step import TasksPromptStep -from .tasks_return_step import TasksReturnStep -from .tasks_search_step import TasksSearchStep -from .tasks_set_step import TasksSetStep -from .tasks_sleep_step import TasksSleepStep -from .tasks_tool_call_step import TasksToolCallStep -from .tasks_wait_for_input_step import TasksWaitForInputStep -from .tasks_yield_step import TasksYieldStep +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .chat_chat_settings import ChatChatSettings +from .common_py_expression import CommonPyExpression +from .common_tool_ref import CommonToolRef +from .docs_embed_query_request import DocsEmbedQueryRequest +from .tasks_prompt_step_prompt import TasksPromptStepPrompt +from .tasks_search_step_search import TasksSearchStepSearch +from .tasks_set_step_set import TasksSetStepSet +from .tasks_sleep_for import TasksSleepFor + + +class TasksIfElseWorkflowStepThen_Evaluate(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + evaluate: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["evaluate"] = pydantic_v1.Field( + alias="kind_", default="evaluate" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_ToolCall(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + tool: CommonToolRef + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["tool_call"] = pydantic_v1.Field( + alias="kind_", default="tool_call" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Yield(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + workflow: str + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["yield"] = pydantic_v1.Field(alias="kind_", default="yield") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Prompt(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + prompt: TasksPromptStepPrompt + settings: ChatChatSettings + kind: typing.Literal["prompt"] = pydantic_v1.Field(alias="kind_", default="prompt") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Error(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + error: str + kind: typing.Literal["error"] = pydantic_v1.Field(alias="kind_", default="error") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Sleep(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + sleep: TasksSleepFor + kind: typing.Literal["sleep"] = pydantic_v1.Field(alias="kind_", default="sleep") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Return(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + return_: typing.Dict[str, CommonPyExpression] = pydantic_v1.Field(alias="return") + kind: typing.Literal["return"] = pydantic_v1.Field(alias="kind_", default="return") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Get(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + get: str + kind: typing.Literal["get"] = pydantic_v1.Field(alias="kind_", default="get") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Set(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + set_: TasksSetStepSet = pydantic_v1.Field(alias="set") + kind: typing.Literal["set"] = pydantic_v1.Field(alias="kind_", default="set") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Log(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + log: CommonPyExpression + kind: typing.Literal["log"] = pydantic_v1.Field(alias="kind_", default="log") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Embed(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + embed: DocsEmbedQueryRequest + kind: typing.Literal["embed"] = pydantic_v1.Field(alias="kind_", default="embed") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_Search(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + search: TasksSearchStepSearch + kind: typing.Literal["search"] = pydantic_v1.Field(alias="kind_", default="search") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksIfElseWorkflowStepThen_WaitForInput(pydantic_v1.BaseModel): + """ + The steps to run if the condition is true + """ + + wait_for_input: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["wait_for_input"] = pydantic_v1.Field( + alias="kind_", default="wait_for_input" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + TasksIfElseWorkflowStepThen = typing.Union[ - typing.Any, - TasksToolCallStep, - TasksYieldStep, - TasksPromptStep, - TasksErrorWorkflowStep, - TasksSleepStep, - TasksReturnStep, - TasksGetStep, - TasksSetStep, - TasksLogStep, - TasksEmbedStep, - TasksSearchStep, - TasksWaitForInputStep, + TasksIfElseWorkflowStepThen_Evaluate, + TasksIfElseWorkflowStepThen_ToolCall, + TasksIfElseWorkflowStepThen_Yield, + TasksIfElseWorkflowStepThen_Prompt, + TasksIfElseWorkflowStepThen_Error, + TasksIfElseWorkflowStepThen_Sleep, + TasksIfElseWorkflowStepThen_Return, + TasksIfElseWorkflowStepThen_Get, + TasksIfElseWorkflowStepThen_Set, + TasksIfElseWorkflowStepThen_Log, + TasksIfElseWorkflowStepThen_Embed, + TasksIfElseWorkflowStepThen_Search, + TasksIfElseWorkflowStepThen_WaitForInput, ] diff --git a/sdks/python/julep/api/types/tasks_parallel_step_parallel_item.py b/sdks/python/julep/api/types/tasks_parallel_step_parallel_item.py index 0b881fed7..72c55b610 100644 --- a/sdks/python/julep/api/types/tasks_parallel_step_parallel_item.py +++ b/sdks/python/julep/api/types/tasks_parallel_step_parallel_item.py @@ -1,32 +1,537 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import datetime as dt import typing -from .tasks_embed_step import TasksEmbedStep -from .tasks_error_workflow_step import TasksErrorWorkflowStep -from .tasks_get_step import TasksGetStep -from .tasks_log_step import TasksLogStep -from .tasks_prompt_step import TasksPromptStep -from .tasks_return_step import TasksReturnStep -from .tasks_search_step import TasksSearchStep -from .tasks_set_step import TasksSetStep -from .tasks_sleep_step import TasksSleepStep -from .tasks_tool_call_step import TasksToolCallStep -from .tasks_wait_for_input_step import TasksWaitForInputStep -from .tasks_yield_step import TasksYieldStep +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .chat_chat_settings import ChatChatSettings +from .common_py_expression import CommonPyExpression +from .common_tool_ref import CommonToolRef +from .docs_embed_query_request import DocsEmbedQueryRequest +from .tasks_prompt_step_prompt import TasksPromptStepPrompt +from .tasks_search_step_search import TasksSearchStepSearch +from .tasks_set_step_set import TasksSetStepSet +from .tasks_sleep_for import TasksSleepFor + + +class TasksParallelStepParallelItem_Evaluate(pydantic_v1.BaseModel): + evaluate: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["evaluate"] = pydantic_v1.Field( + alias="kind_", default="evaluate" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_ToolCall(pydantic_v1.BaseModel): + tool: CommonToolRef + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["tool_call"] = pydantic_v1.Field( + alias="kind_", default="tool_call" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Yield(pydantic_v1.BaseModel): + workflow: str + arguments: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["yield"] = pydantic_v1.Field(alias="kind_", default="yield") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Prompt(pydantic_v1.BaseModel): + prompt: TasksPromptStepPrompt + settings: ChatChatSettings + kind: typing.Literal["prompt"] = pydantic_v1.Field(alias="kind_", default="prompt") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Error(pydantic_v1.BaseModel): + error: str + kind: typing.Literal["error"] = pydantic_v1.Field(alias="kind_", default="error") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Sleep(pydantic_v1.BaseModel): + sleep: TasksSleepFor + kind: typing.Literal["sleep"] = pydantic_v1.Field(alias="kind_", default="sleep") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Return(pydantic_v1.BaseModel): + return_: typing.Dict[str, CommonPyExpression] = pydantic_v1.Field(alias="return") + kind: typing.Literal["return"] = pydantic_v1.Field(alias="kind_", default="return") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Get(pydantic_v1.BaseModel): + get: str + kind: typing.Literal["get"] = pydantic_v1.Field(alias="kind_", default="get") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Set(pydantic_v1.BaseModel): + set_: TasksSetStepSet = pydantic_v1.Field(alias="set") + kind: typing.Literal["set"] = pydantic_v1.Field(alias="kind_", default="set") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Log(pydantic_v1.BaseModel): + log: CommonPyExpression + kind: typing.Literal["log"] = pydantic_v1.Field(alias="kind_", default="log") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Embed(pydantic_v1.BaseModel): + embed: DocsEmbedQueryRequest + kind: typing.Literal["embed"] = pydantic_v1.Field(alias="kind_", default="embed") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_Search(pydantic_v1.BaseModel): + search: TasksSearchStepSearch + kind: typing.Literal["search"] = pydantic_v1.Field(alias="kind_", default="search") + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + + +class TasksParallelStepParallelItem_WaitForInput(pydantic_v1.BaseModel): + wait_for_input: typing.Dict[str, CommonPyExpression] + kind: typing.Literal["wait_for_input"] = pydantic_v1.Field( + alias="kind_", default="wait_for_input" + ) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + allow_population_by_field_name = True + populate_by_name = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} + TasksParallelStepParallelItem = typing.Union[ - typing.Any, - TasksToolCallStep, - TasksYieldStep, - TasksPromptStep, - TasksErrorWorkflowStep, - TasksSleepStep, - TasksReturnStep, - TasksGetStep, - TasksSetStep, - TasksLogStep, - TasksEmbedStep, - TasksSearchStep, - TasksWaitForInputStep, + TasksParallelStepParallelItem_Evaluate, + TasksParallelStepParallelItem_ToolCall, + TasksParallelStepParallelItem_Yield, + TasksParallelStepParallelItem_Prompt, + TasksParallelStepParallelItem_Error, + TasksParallelStepParallelItem_Sleep, + TasksParallelStepParallelItem_Return, + TasksParallelStepParallelItem_Get, + TasksParallelStepParallelItem_Set, + TasksParallelStepParallelItem_Log, + TasksParallelStepParallelItem_Embed, + TasksParallelStepParallelItem_Search, + TasksParallelStepParallelItem_WaitForInput, ] diff --git a/sdks/python/julep/api/types/tasks_patch_task_request_main_item.py b/sdks/python/julep/api/types/tasks_patch_task_request_main_item.py index 8821ddfa8..bcf9ba690 100644 --- a/sdks/python/julep/api/types/tasks_patch_task_request_main_item.py +++ b/sdks/python/julep/api/types/tasks_patch_task_request_main_item.py @@ -65,7 +65,7 @@ class Config: class TasksPatchTaskRequestMainItem_ToolCall(pydantic_v1.BaseModel): tool: CommonToolRef - arguments: typing.Dict[str, typing.Any] + arguments: typing.Dict[str, CommonPyExpression] kind: typing.Literal["tool_call"] = pydantic_v1.Field( alias="kind_", default="tool_call" ) diff --git a/sdks/python/julep/api/types/tasks_task_main_item.py b/sdks/python/julep/api/types/tasks_task_main_item.py index 3206c4a8e..6cba1d2e2 100644 --- a/sdks/python/julep/api/types/tasks_task_main_item.py +++ b/sdks/python/julep/api/types/tasks_task_main_item.py @@ -65,7 +65,7 @@ class Config: class TasksTaskMainItem_ToolCall(pydantic_v1.BaseModel): tool: CommonToolRef - arguments: typing.Dict[str, typing.Any] + arguments: typing.Dict[str, CommonPyExpression] kind: typing.Literal["tool_call"] = pydantic_v1.Field( alias="kind_", default="tool_call" ) diff --git a/sdks/python/julep/api/types/tasks_tool_call_step.py b/sdks/python/julep/api/types/tasks_tool_call_step.py index e9ee19b9e..8923e9140 100644 --- a/sdks/python/julep/api/types/tasks_tool_call_step.py +++ b/sdks/python/julep/api/types/tasks_tool_call_step.py @@ -5,6 +5,7 @@ from ..core.datetime_utils import serialize_datetime from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .common_py_expression import CommonPyExpression from .common_tool_ref import CommonToolRef @@ -14,7 +15,7 @@ class TasksToolCallStep(pydantic_v1.BaseModel): The tool to run """ - arguments: typing.Dict[str, typing.Any] = pydantic_v1.Field() + arguments: typing.Dict[str, CommonPyExpression] = pydantic_v1.Field() """ The input parameters for the tool """ diff --git a/sdks/python/julep/api/types/tasks_update_task_request_main_item.py b/sdks/python/julep/api/types/tasks_update_task_request_main_item.py index 2897a5e8e..7eb7d9a75 100644 --- a/sdks/python/julep/api/types/tasks_update_task_request_main_item.py +++ b/sdks/python/julep/api/types/tasks_update_task_request_main_item.py @@ -65,7 +65,7 @@ class Config: class TasksUpdateTaskRequestMainItem_ToolCall(pydantic_v1.BaseModel): tool: CommonToolRef - arguments: typing.Dict[str, typing.Any] + arguments: typing.Dict[str, CommonPyExpression] kind: typing.Literal["tool_call"] = pydantic_v1.Field( alias="kind_", default="tool_call" ) diff --git a/sdks/python/poetry.lock b/sdks/python/poetry.lock index f7ccaf4a7..ec7e2547a 100644 --- a/sdks/python/poetry.lock +++ b/sdks/python/poetry.lock @@ -829,13 +829,13 @@ networkx = ">=2" [[package]] name = "importlib-metadata" -version = "8.2.0" +version = "8.3.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-8.2.0-py3-none-any.whl", hash = "sha256:11901fa0c2f97919b288679932bb64febaeacf289d18ac84dd68cb2e74213369"}, - {file = "importlib_metadata-8.2.0.tar.gz", hash = "sha256:72e8d4399996132204f9a16dcc751af254a48f8d1b20b9ff0f98d4a8f901e73d"}, + {file = "importlib_metadata-8.3.0-py3-none-any.whl", hash = "sha256:42817a4a0be5845d22c6e212db66a94ad261e2318d80b3e0d363894a79df2b67"}, + {file = "importlib_metadata-8.3.0.tar.gz", hash = "sha256:9c8fa6e8ea0f9516ad5c8db9246a731c948193c7754d3babb0114a05b27dd364"}, ] [package.dependencies] @@ -1812,13 +1812,13 @@ files = [ [[package]] name = "openai" -version = "1.41.0" +version = "1.41.1" description = "The official Python library for the openai API" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-1.41.0-py3-none-any.whl", hash = "sha256:3b6cca4571667f3e0800442ef8f2bfa6a6f3301c51776bc7626159a4d81c242c"}, - {file = "openai-1.41.0.tar.gz", hash = "sha256:26b81f39b49dce92ff5d30c373625ddb212c2f1050e1574e456d18423730cdd0"}, + {file = "openai-1.41.1-py3-none-any.whl", hash = "sha256:56fb04105263f79559aff3ceea2e1dd16f8c5385e8238cb66cf0e6888fa8bfcf"}, + {file = "openai-1.41.1.tar.gz", hash = "sha256:e38e376efd91e0d4db071e2a6517b6b4cac1c2a6fd63efdc5ec6be10c5967c1b"}, ] [package.dependencies] @@ -2926,19 +2926,19 @@ win32 = ["pywin32"] [[package]] name = "setuptools" -version = "72.2.0" +version = "73.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-72.2.0-py3-none-any.whl", hash = "sha256:f11dd94b7bae3a156a95ec151f24e4637fb4fa19c878e4d191bfb8b2d82728c4"}, - {file = "setuptools-72.2.0.tar.gz", hash = "sha256:80aacbf633704e9c8bfa1d99fa5dd4dc59573efcf9e4042c13d3bcef91ac2ef9"}, + {file = "setuptools-73.0.0-py3-none-any.whl", hash = "sha256:f2bfcce7ae1784d90b04c57c2802e8649e1976530bb25dc72c2b078d3ecf4864"}, + {file = "setuptools-73.0.0.tar.gz", hash = "sha256:3c08705fadfc8c7c445cf4d98078f0fafb9225775b2b4e8447e40348f82597c0"}, ] [package.extras] -core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "ordered-set (>=3.1.1)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] +core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] [[package]] name = "shellingham" diff --git a/sdks/ts/src/api/models/Tasks_CaseThen.ts b/sdks/ts/src/api/models/Tasks_CaseThen.ts index 43bc0d588..c55e939ad 100644 --- a/sdks/ts/src/api/models/Tasks_CaseThen.ts +++ b/sdks/ts/src/api/models/Tasks_CaseThen.ts @@ -5,6 +5,7 @@ import type { Common_PyExpression } from "./Common_PyExpression"; import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; +import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; import type { Tasks_GetStep } from "./Tasks_GetStep"; import type { Tasks_LogStep } from "./Tasks_LogStep"; import type { Tasks_PromptStep } from "./Tasks_PromptStep"; @@ -24,6 +25,7 @@ export type Tasks_CaseThen = { * The steps to run if the condition is true */ then: + | Tasks_EvaluateStep | Tasks_ToolCallStep | Tasks_YieldStep | Tasks_PromptStep diff --git a/sdks/ts/src/api/models/Tasks_ForeachDo.ts b/sdks/ts/src/api/models/Tasks_ForeachDo.ts index 5858114ed..76c4ed617 100644 --- a/sdks/ts/src/api/models/Tasks_ForeachDo.ts +++ b/sdks/ts/src/api/models/Tasks_ForeachDo.ts @@ -5,6 +5,7 @@ import type { Common_PyExpression } from "./Common_PyExpression"; import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; +import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; import type { Tasks_GetStep } from "./Tasks_GetStep"; import type { Tasks_LogStep } from "./Tasks_LogStep"; import type { Tasks_PromptStep } from "./Tasks_PromptStep"; @@ -24,6 +25,7 @@ export type Tasks_ForeachDo = { * The steps to run for each iteration */ do: + | Tasks_EvaluateStep | Tasks_ToolCallStep | Tasks_YieldStep | Tasks_PromptStep diff --git a/sdks/ts/src/api/models/Tasks_IfElseWorkflowStep.ts b/sdks/ts/src/api/models/Tasks_IfElseWorkflowStep.ts index dc2212143..d2df5d79e 100644 --- a/sdks/ts/src/api/models/Tasks_IfElseWorkflowStep.ts +++ b/sdks/ts/src/api/models/Tasks_IfElseWorkflowStep.ts @@ -6,6 +6,7 @@ import type { Common_PyExpression } from "./Common_PyExpression"; import type { Tasks_BaseWorkflowStep } from "./Tasks_BaseWorkflowStep"; import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; +import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; import type { Tasks_GetStep } from "./Tasks_GetStep"; import type { Tasks_LogStep } from "./Tasks_LogStep"; import type { Tasks_PromptStep } from "./Tasks_PromptStep"; @@ -26,6 +27,7 @@ export type Tasks_IfElseWorkflowStep = Tasks_BaseWorkflowStep & { * The steps to run if the condition is true */ then: + | Tasks_EvaluateStep | Tasks_ToolCallStep | Tasks_YieldStep | Tasks_PromptStep @@ -42,6 +44,7 @@ export type Tasks_IfElseWorkflowStep = Tasks_BaseWorkflowStep & { * The steps to run if the condition is false */ else: + | Tasks_EvaluateStep | Tasks_ToolCallStep | Tasks_YieldStep | Tasks_PromptStep diff --git a/sdks/ts/src/api/models/Tasks_ParallelStep.ts b/sdks/ts/src/api/models/Tasks_ParallelStep.ts index a094a3eca..da6f9f399 100644 --- a/sdks/ts/src/api/models/Tasks_ParallelStep.ts +++ b/sdks/ts/src/api/models/Tasks_ParallelStep.ts @@ -5,6 +5,7 @@ import type { Tasks_BaseWorkflowStep } from "./Tasks_BaseWorkflowStep"; import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; +import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; import type { Tasks_GetStep } from "./Tasks_GetStep"; import type { Tasks_LogStep } from "./Tasks_LogStep"; import type { Tasks_PromptStep } from "./Tasks_PromptStep"; @@ -21,6 +22,7 @@ export type Tasks_ParallelStep = Tasks_BaseWorkflowStep & { * The steps to run in parallel. Max concurrency will depend on the platform */ parallel: Array< + | Tasks_EvaluateStep | Tasks_ToolCallStep | Tasks_YieldStep | Tasks_PromptStep diff --git a/sdks/ts/src/api/models/Tasks_ToolCallStep.ts b/sdks/ts/src/api/models/Tasks_ToolCallStep.ts index 84e34c703..f0a758372 100644 --- a/sdks/ts/src/api/models/Tasks_ToolCallStep.ts +++ b/sdks/ts/src/api/models/Tasks_ToolCallStep.ts @@ -2,6 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { Common_PyExpression } from "./Common_PyExpression"; import type { Common_toolRef } from "./Common_toolRef"; import type { Tasks_BaseWorkflowStep } from "./Tasks_BaseWorkflowStep"; export type Tasks_ToolCallStep = Tasks_BaseWorkflowStep & { @@ -13,5 +14,5 @@ export type Tasks_ToolCallStep = Tasks_BaseWorkflowStep & { /** * The input parameters for the tool */ - arguments: Record; + arguments: Record; }; diff --git a/sdks/ts/src/api/schemas/$Tasks_CaseThen.ts b/sdks/ts/src/api/schemas/$Tasks_CaseThen.ts index 0e8eceebc..c58942ef5 100644 --- a/sdks/ts/src/api/schemas/$Tasks_CaseThen.ts +++ b/sdks/ts/src/api/schemas/$Tasks_CaseThen.ts @@ -18,6 +18,9 @@ export const $Tasks_CaseThen = { type: "any-of", description: `The steps to run if the condition is true`, contains: [ + { + type: "Tasks_EvaluateStep", + }, { type: "Tasks_ToolCallStep", }, diff --git a/sdks/ts/src/api/schemas/$Tasks_ForeachDo.ts b/sdks/ts/src/api/schemas/$Tasks_ForeachDo.ts index 3b05392db..c9dbd8b1c 100644 --- a/sdks/ts/src/api/schemas/$Tasks_ForeachDo.ts +++ b/sdks/ts/src/api/schemas/$Tasks_ForeachDo.ts @@ -18,6 +18,9 @@ export const $Tasks_ForeachDo = { type: "any-of", description: `The steps to run for each iteration`, contains: [ + { + type: "Tasks_EvaluateStep", + }, { type: "Tasks_ToolCallStep", }, diff --git a/sdks/ts/src/api/schemas/$Tasks_IfElseWorkflowStep.ts b/sdks/ts/src/api/schemas/$Tasks_IfElseWorkflowStep.ts index a1def86dc..7f615c5fc 100644 --- a/sdks/ts/src/api/schemas/$Tasks_IfElseWorkflowStep.ts +++ b/sdks/ts/src/api/schemas/$Tasks_IfElseWorkflowStep.ts @@ -28,6 +28,9 @@ export const $Tasks_IfElseWorkflowStep = { type: "any-of", description: `The steps to run if the condition is true`, contains: [ + { + type: "Tasks_EvaluateStep", + }, { type: "Tasks_ToolCallStep", }, @@ -71,6 +74,9 @@ export const $Tasks_IfElseWorkflowStep = { type: "any-of", description: `The steps to run if the condition is false`, contains: [ + { + type: "Tasks_EvaluateStep", + }, { type: "Tasks_ToolCallStep", }, diff --git a/sdks/ts/src/api/schemas/$Tasks_ParallelStep.ts b/sdks/ts/src/api/schemas/$Tasks_ParallelStep.ts index cf1f97820..956a7d131 100644 --- a/sdks/ts/src/api/schemas/$Tasks_ParallelStep.ts +++ b/sdks/ts/src/api/schemas/$Tasks_ParallelStep.ts @@ -19,6 +19,9 @@ export const $Tasks_ParallelStep = { contains: { type: "any-of", contains: [ + { + type: "Tasks_EvaluateStep", + }, { type: "Tasks_ToolCallStep", }, diff --git a/sdks/ts/src/api/schemas/$Tasks_ToolCallStep.ts b/sdks/ts/src/api/schemas/$Tasks_ToolCallStep.ts index 37f6b0179..1f6a07c09 100644 --- a/sdks/ts/src/api/schemas/$Tasks_ToolCallStep.ts +++ b/sdks/ts/src/api/schemas/$Tasks_ToolCallStep.ts @@ -27,7 +27,7 @@ export const $Tasks_ToolCallStep = { arguments: { type: "dictionary", contains: { - properties: {}, + type: "Common_PyExpression", }, isRequired: true, }, diff --git a/typespec/package-lock.json b/typespec/package-lock.json index f535be674..90269602f 100644 --- a/typespec/package-lock.json +++ b/typespec/package-lock.json @@ -8,12 +8,12 @@ "name": "julep-typespec", "version": "0.3.0", "dependencies": { - "@typespec/compiler": "^0.58.1", - "@typespec/http": "^0.58.0", - "@typespec/openapi": "^0.58.0", - "@typespec/openapi3": "^0.58.0", - "@typespec/rest": "^0.58.0", - "@typespec/versioning": "^0.58.0" + "@typespec/compiler": "^0.59.1", + "@typespec/http": "^0.59.1", + "@typespec/openapi": "^0.59.0", + "@typespec/openapi3": "^0.59.1", + "@typespec/rest": "^0.59.1", + "@typespec/versioning": "^0.59.0" } }, "node_modules/@apidevtools/swagger-methods": { @@ -274,20 +274,20 @@ "license": "MIT" }, "node_modules/@typespec/compiler": { - "version": "0.58.1", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.58.1.tgz", - "integrity": "sha512-bVxxM35r40OtuL4+/9W/g1EevlnWnW6i151nsZAFOJj1xWHoE2G9zkx5/Feic8OlzArjhGGLJOLH3Ez1Wrw35A==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.59.1.tgz", + "integrity": "sha512-O2ljgr6YoFaIH6a8lWc90/czdv4B2X6N9wz4WsnQnVvgO0Tj0s+3xkvp4Tv59RKMhT0f3fK6dL8oEGO32FYk1A==", "license": "MIT", "dependencies": { "@babel/code-frame": "~7.24.7", - "ajv": "~8.16.0", + "ajv": "~8.17.1", "change-case": "~5.4.4", "globby": "~14.0.2", "mustache": "~4.2.0", "picocolors": "~1.0.1", - "prettier": "~3.3.2", + "prettier": "~3.3.3", "prompts": "~2.4.2", - "semver": "^7.6.2", + "semver": "^7.6.3", "temporal-polyfill": "^0.2.5", "vscode-languageserver": "~9.0.1", "vscode-languageserver-textdocument": "~1.0.11", @@ -303,34 +303,34 @@ } }, "node_modules/@typespec/http": { - "version": "0.58.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.58.0.tgz", - "integrity": "sha512-jQpkugg9AZVrNDMkDIgZRpIoRkkU2b0LtKWqMGg33MItYj9/DYSgDtY7xb7oCBppRtFFZ/h138HyhYl3zQxZRg==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.59.1.tgz", + "integrity": "sha512-Ai8oCAO+Bw1HMSZ9gOI5Od4fNn/ul4HrVtTB01xFuLK6FQj854pxhzao8ylPnr7gIRQ327FV12/QfXR87yCiYQ==", "license": "MIT", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.58.0" + "@typespec/compiler": "~0.59.0" } }, "node_modules/@typespec/openapi": { - "version": "0.58.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.58.0.tgz", - "integrity": "sha512-gu6nXfmpfZrfq8Etpgl1dpMfsXii7EzQyhZgsPhIy7ZwV5bDmFk1/oyhTqIpWrnr4pD3r151T2BQjzJefjf15A==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.59.0.tgz", + "integrity": "sha512-do1Dm5w0MuK3994gYTBg6qMfgeIxmmsDqnz3zimYKMPpbnUBi4F6/o4iCfn0Fn9kaNl+H6UlOzZpsZW9xHui1Q==", "license": "MIT", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.58.0", - "@typespec/http": "~0.58.0" + "@typespec/compiler": "~0.59.0", + "@typespec/http": "~0.59.0" } }, "node_modules/@typespec/openapi3": { - "version": "0.58.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-0.58.0.tgz", - "integrity": "sha512-G9t9CWT9cN6ip39dLZaE6JdEDxGsFyOUxA2s6a087rweoTH85XzsFiQL7uiUD8vHhXyEo6tF6sy3LMZVN0BsoQ==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-0.59.1.tgz", + "integrity": "sha512-89VbUbkWKxeFgE0w0hpVyk1UZ6ZHRxOhcAHvF5MgxQxEhs2ALXKAqapWjFQsYrLBhAUoWzdPFrJJUMbwF9kX0Q==", "license": "MIT", "dependencies": { "@readme/openapi-parser": "~2.6.0", @@ -343,47 +343,47 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.58.0", - "@typespec/http": "~0.58.0", - "@typespec/openapi": "~0.58.0", - "@typespec/versioning": "~0.58.0" + "@typespec/compiler": "~0.59.0", + "@typespec/http": "~0.59.1", + "@typespec/openapi": "~0.59.0", + "@typespec/versioning": "~0.59.0" } }, "node_modules/@typespec/rest": { - "version": "0.58.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.58.0.tgz", - "integrity": "sha512-QBxkED0/KQKG22pwzis0n7BY+uLMSZZPSoVe/ESBFika9n5/yyeQ0l58xbFFwwfxAxe4xwuZ5PNwTdEXZbzr5g==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.59.1.tgz", + "integrity": "sha512-uKU431jBYL2tVQWG5THA75+OtXDa1e8cMAafYK/JJRRiVRd8D/Epd8fp07dzlB8tFGrhCaGlekRMqFPFrHh2/A==", "license": "MIT", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.58.0", - "@typespec/http": "~0.58.0" + "@typespec/compiler": "~0.59.0", + "@typespec/http": "~0.59.1" } }, "node_modules/@typespec/versioning": { - "version": "0.58.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.58.0.tgz", - "integrity": "sha512-brnQQ3wKWh4AbgqmnVLj+8zyOaDk9VPWg4QBecdQxzz7PrSrlAzIzRfeIyr67+hwi/0SvkTAB6GNH7YYTypKGA==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.59.0.tgz", + "integrity": "sha512-aihO/ux0lLmsuYAdGVkiBflSudcZokYG42SELk1FtMFo609G3Pd7ep7hau6unBnMIceQZejB0ow5UGRupK4X5A==", "license": "MIT", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.58.0" + "@typespec/compiler": "~0.59.0" } }, "node_modules/ajv": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", - "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -553,6 +553,12 @@ "node": ">=8.6.0" } }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", + "license": "MIT" + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -838,15 +844,6 @@ "node": ">= 6" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -925,9 +922,9 @@ } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -1031,15 +1028,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", diff --git a/typespec/package.json b/typespec/package.json index 95c181471..a7b3d7ee4 100644 --- a/typespec/package.json +++ b/typespec/package.json @@ -3,12 +3,12 @@ "version": "0.3.0", "type": "module", "dependencies": { - "@typespec/compiler": "^0.58.1", - "@typespec/http": "^0.58.0", - "@typespec/openapi": "^0.58.0", - "@typespec/openapi3": "^0.58.0", - "@typespec/rest": "^0.58.0", - "@typespec/versioning": "^0.58.0" + "@typespec/compiler": "^0.59.1", + "@typespec/http": "^0.59.1", + "@typespec/openapi": "^0.59.0", + "@typespec/openapi3": "^0.59.1", + "@typespec/rest": "^0.59.1", + "@typespec/versioning": "^0.59.0" }, "private": true } diff --git a/typespec/tasks/steps.tsp b/typespec/tasks/steps.tsp index 9cf3b9b06..2da1d2cdf 100644 --- a/typespec/tasks/steps.tsp +++ b/typespec/tasks/steps.tsp @@ -22,6 +22,7 @@ namespace Tasks; /** An object where values are strings in the Common Expression Language that get evaluated before being passed downstream */ alias ExpressionObject = Record; +alias NestedExpressionObject = Record; @discriminator("kind_") model BaseWorkflowStep { @@ -29,10 +30,6 @@ model BaseWorkflowStep { kind_: WorkflowStepKind; } -BREAKING THIS FILE INTENTIONALLY SO IT DOESTN'T GET COMPILED -BECAUSE IT SEEMS LIKE TYPESPEC HAS A BUG WHERE IT ADDS `{}` TO THE RENDERED `NonConditionalWorkflowStep` -YOU CAN COMMENT THIS AND COMPILE IF YOU KNOW WHAT YOU'RE DOING - alias NonConditionalWorkflowStep = | EvaluateStep | ToolCallStep @@ -65,7 +62,7 @@ model ToolCallStep extends BaseWorkflowStep { tool: toolRef; /** The input parameters for the tool */ - arguments: Record; + arguments: ExpressionObject; } model PromptStep extends BaseWorkflowStep {