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

fix: Apply various small fixes to task execution logic #436

Merged
merged 3 commits into from
Jul 26, 2024

Conversation

whiterabbit1983
Copy link
Contributor

@whiterabbit1983 whiterabbit1983 commented Jul 23, 2024

🚀 This description was created by Ellipsis for commit 72f6782

Summary:

Applied various small fixes to task execution logic, including enabling and implementing workflow steps, updating models, adding logging, and error handling.

Key points:

  • Enabled and implemented yield_step and if_else_step in agents_api/activities/task_steps/__init__.py.
  • Updated agents_api/autogen/openapi_model.py to include new models and enums like ToolResponse, ExecutionStatus, and TransitionType.
  • Added data_converter to Temporal client in agents_api/clients/temporal.py.
  • Modified create_execution_query in agents_api/models/execution/create_execution.py to handle new statuses.
  • Updated create_agent endpoint in agents_api/routers/agents/create_agent.py to handle default values for optional fields.
  • Added logging and error handling in agents_api/routers/tasks/routers.py.
  • Enabled yield_step in agents_api/worker/__main__.py.
  • Implemented if_else_step and yield_step in agents_api/workflows/task_execution.py.
  • Updated dependencies in agents-api/pyproject.toml to include simpleeval.
  • Updated openapi.yaml to reflect new models and endpoints.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 277c168 in 1.0 minute and 2.5101609999999965 seconds

More details
  • Looked at 586 lines of code in 10 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_4ON5NGRrPpUYdUL4


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 72f6782 in 1.0 minute and 18.215592 seconds

More details
  • Looked at 86 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. agents-api/agents_api/activities/task_steps/__init__.py:122
  • Draft comment:
    The change from workflow to goto_workflow in the return statement of if_else_step is correctly handled in task_execution.py where goto_workflow is accessed. This ensures consistency in data flow.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change in the return key from workflow to goto_workflow in if_else_step function in agents_api/activities/task_steps/__init__.py is reflected in the task_execution.py file where the output key is correctly accessed as goto_workflow. This ensures consistency in the data flow between the activity and the workflow that uses its output. This is a correct implementation and does not require any changes.
2. agents-api/agents_api/common/utils/json.py:41
  • Draft comment:
    The CustomJSONEncoder uses model_dump() for BaseModel instances. Ensure all BaseModel subclasses implement this method or provide a fallback mechanism to avoid AttributeError.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.
3. agents-api/agents_api/routers/agents/create_agent.py:11
  • Draft comment:
    Removal of utcnow import is appropriate as there's no usage in this file. Ensure timestamps are handled correctly in create_agent_query or by the database/model.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The create_agent endpoint in agents_api/routers/agents/create_agent.py has removed the import of utcnow from ...common.utils.datetime, but there is no usage of utcnow in the provided code snippet. This suggests that the removal is appropriate if the timestamp is handled elsewhere (likely within the create_agent_query function or automatically by the database/model layer). This change seems justified and does not introduce any issues based on the provided code.
4. agents-api/agents_api/worker/__main__.py:80
  • Draft comment:
    Enabling yield_step in the worker's main function aligns with the PR's intent to enable various task steps. Ensure that all necessary dependencies and configurations for yield_step are correctly set up.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The yield_step function in agents_api/worker/__main__.py is enabled, and the corresponding activity is also enabled in the worker's main function. This is consistent with the PR's intent to enable and implement various task steps. The inclusion of yield_step in the worker's activity list ensures that it can be executed as part of the workflows that require it.

Workflow ID: wflow_3QwGNDvNjYyHFmuY


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@whiterabbit1983 whiterabbit1983 merged commit 787ba7b into dev-tasks Jul 26, 2024
3 of 6 checks passed
@whiterabbit1983 whiterabbit1983 deleted the f/dev-tasks-workflows branch July 26, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant