Skip to content

Commit

Permalink
feat(agents-api): Rename transition.type and execution.status
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Tomer <[email protected]>
  • Loading branch information
Diwank Tomer committed Jun 6, 2024
1 parent c75f205 commit 84725bc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion agents-api/agents_api/autogen/openapi_model.py
Original file line number Diff line number Diff line change
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"
detail: Detail | None = "auto" # pytype: disable=annotation-type-mismatch
"""
image detail to feed into the model can be low | high | auto
"""
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/models/execution/create_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def create_execution_query(
task_id: UUID,
execution_id: UUID,
status: Literal[
"queued", "starting", "running", "waiting_for_input", "success", "failed"
"queued", "starting", "running", "awaiting_input", "succeeded", "failed"
] = "queued",
arguments: Dict[str, Any] = {},
) -> tuple[str, dict]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def create_execution_transition_query(
developer_id: UUID,
execution_id: UUID,
transition_id: UUID,
type_: Literal["finished", "waiting", "error", "step"],
type_: Literal["finish", "wait", "error", "step"],
from_: tuple[str, int],
to: tuple[str, int] | None,
output: Dict[str, Any],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def update_execution_status_query(
task_id: UUID,
execution_id: UUID,
status: Literal[
"queued", "starting", "running", "waiting_for_input", "success", "failed"
"queued", "starting", "running", "awaiting_input", "succeeded", "failed"
],
arguments: Dict[str, Any] = {},
) -> tuple[str, dict]:
Expand Down
7 changes: 7 additions & 0 deletions agents-api/agents_api/workflows/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
#!/usr/bin/env python3

from temporalio import workflow

with workflow.unsafe.imports_passed_through():
import logging

logging.basicConfig(level=logging.INFO)
4 changes: 2 additions & 2 deletions agents-api/migrations/migrate_1716939839_task_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def run(client, queries):
execution_id: Uuid,
=>
status: String default 'queued',
# one of: "queued", "starting", "running", "waiting_for_input", "success", "failed"
# one of: "queued", "starting", "running", "awaiting_input", "succeeded", "failed"
arguments: Json,
created_at: Float default now(),
Expand All @@ -54,7 +54,7 @@ def run(client, queries):
transition_id: Uuid,
=>
type: String,
# one of: "finished", "waiting", "error", "step"
# one of: "finish", "wait", "error", "step"
from: (String, Int),
to: (String, Int)?,
Expand Down

0 comments on commit 84725bc

Please sign in to comment.