Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ellipsis] refactor: move execution logic to queries and update imports #987

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion agents-api/agents_api/activities/task_steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from .base_evaluate import base_evaluate

# from .cozo_query_step import cozo_query_step
from .evaluate_step import evaluate_step
from .for_each_step import for_each_step
from .get_value_step import get_value_step
Expand Down
2 changes: 0 additions & 2 deletions agents-api/agents_api/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@

# Cozo
# ----
cozo_host: str = env.str("COZO_HOST", default="http://127.0.0.1:9070")
cozo_auth: str = env.str("COZO_AUTH_TOKEN", default=None)
summarization_model_name: str = env.str(
"SUMMARIZATION_MODEL_NAME", default="gpt-4-turbo"
)
Expand Down
2 changes: 0 additions & 2 deletions agents-api/agents_api/queries/executions/create_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
rewrap_exceptions,
wrap_in_class,
)
from .constants import OUTPUT_UNNEST_KEY

ModelT = TypeVar("ModelT", bound=Any)
T = TypeVar("T")
Expand All @@ -33,7 +32,6 @@
# transform=lambda d: {"id": d["execution_id"], **d},
# _kind="inserted",
# )
# @cozo_query
# @increase_counter("create_execution")
# @beartype
async def create_execution(
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/queries/executions/get_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
pg_query,
wrap_in_class,
)
from .constants import OUTPUT_UNNEST_KEY

ModelT = TypeVar("ModelT", bound=Any)
T = TypeVar("T")
Expand All @@ -27,6 +26,7 @@
# AssertionError: partialclass(HTTPException, status_code=404),
# QueryException: partialclass(HTTPException, status_code=400),
# ValidationError: partialclass(HTTPException, status_code=400),

# TypeError: partialclass(HTTPException, status_code=400),
# }
# )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pydantic import ValidationError

from ...autogen.openapi_model import Transition

from ..utils import cozo_query, partialclass, rewrap_exceptions, wrap_in_class

ModelT = TypeVar("ModelT", bound=Any)
Expand All @@ -21,7 +22,6 @@
}
)
@wrap_in_class(Transition)
@cozo_query
@beartype
async def list_execution_transitions(
*,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[the existing file is empty]
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
],
},
)
@cozo_query
@beartype
async def prepare_execution_input(
*,
Expand Down
2 changes: 0 additions & 2 deletions agents-api/agents_api/queries/executions/update_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
verify_developer_owns_resource_query,
wrap_in_class,
)
from .constants import OUTPUT_UNNEST_KEY

ModelT = TypeVar("ModelT", bound=Any)
T = TypeVar("T")
Expand All @@ -42,7 +41,6 @@
transform=lambda d: {"id": d["execution_id"], **d},
_kind="inserted",
)
@cozo_query
@increase_counter("update_execution")
@beartype
async def update_execution(
Expand Down
Loading