Skip to content

Commit

Permalink
wip: generate sdk files
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorrr committed Jun 6, 2024
1 parent dfa5637 commit c75f205
Show file tree
Hide file tree
Showing 11 changed files with 545 additions and 350 deletions.
45 changes: 26 additions & 19 deletions agents-api/agents_api/autogen/openapi_model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2024-05-30T20:05:30+00:00
# timestamp: 2024-06-06T17:45:45+00:00

from __future__ import annotations

Expand Down Expand Up @@ -805,7 +805,7 @@ class ImageUrl(BaseModel):
"""
URL or base64 data url (e.g. `data:image/jpeg;base64,<the base64 encoded image>`)
"""
detail: Detail | None = "auto" # pytype: disable=annotation-type-mismatch
detail: Detail | None = "auto"
"""
image detail to feed into the model can be low | high | auto
"""
Expand All @@ -822,18 +822,6 @@ class ChatMLImageContentPart(BaseModel):
"""


class ExecutionTransition(BaseModel):
id: UUID
execution_id: UUID
created_at: AwareDatetime
outputs: Dict[str, Any]
"""
Outputs from an Execution Transition
"""
from_: Annotated[List[str | int], Field(alias="from")]
to: List[str | int]


class CELObject(BaseModel):
pass
model_config = ConfigDict(
Expand Down Expand Up @@ -869,15 +857,15 @@ class CreateExecution(BaseModel):
"""
status: Annotated[
str,
Field(pattern="^(queued|starting|running|waiting_for_input|success|failed)$"),
Field(pattern="^(queued|starting|running|awaiting_input|succeeded|failed)$"),
]
"""
Execution Status
"""


class ToolResponse(BaseModel):
id: UUID | None = None
id: UUID
"""
Optional Tool ID
"""
Expand Down Expand Up @@ -1123,13 +1111,29 @@ class Execution(BaseModel):
"""
status: Annotated[
str,
Field(pattern="^(queued|starting|running|waiting_for_input|success|failed)$"),
Field(pattern="^(queued|starting|running|awaiting_input|succeeded|failed)$"),
]
"""
Execution Status
"""


class ExecutionTransition(BaseModel):
id: UUID
execution_id: UUID
created_at: AwareDatetime
outputs: Dict[str, Any]
"""
Outputs from an Execution Transition
"""
from_: Annotated[List[str | int], Field(alias="from")]
to: List[str | int]
type: Annotated[str, Field(pattern="^(finish|wait|error|step)$")]
"""
Execution Status
"""


class PromptWorkflowStep(BaseModel):
prompt: List[InputChatMLMessage]
"""
Expand All @@ -1147,6 +1151,9 @@ class CreateTask(BaseModel):
Describes a Task
"""

model_config = ConfigDict(
extra="allow",
)
name: str
"""
Name of the Task
Expand All @@ -1163,14 +1170,14 @@ class CreateTask(BaseModel):
"""
JSON Schema of parameters
"""
main: (
main: List[
PromptWorkflowStep
| EvaluateWorkflowStep
| YieldWorkflowStep
| ToolCallWorkflowStep
| ErrorWorkflowStep
| IfElseWorkflowStep
)
]
"""
Entrypoint Workflow for the Task
"""
Expand Down
364 changes: 182 additions & 182 deletions agents-api/poetry.lock

Large diffs are not rendered by default.

Loading

0 comments on commit c75f205

Please sign in to comment.