-
Notifications
You must be signed in to change notification settings - Fork 903
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
Make transitions queries async #910
Conversation
There was a problem hiding this 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! Reviewed everything up to c16b572 in 40 seconds
More details
- Looked at
581
lines of code in8
files - Skipped
1
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. agents-api/agents_api/clients/cozo.py:22
- Draft comment:
Theget_async_cozo_client
function does not handle thecozo_auth
option. Consider updating it to include authentication handling similar toget_cozo_client
. - Reason this comment was not posted:
Comment looked like it was already resolved.
2. agents-api/agents_api/routers/sessions/chat.py:184
- Draft comment:
Duplicate code for checking if the developer is paid and session length. Consider refactoring to avoid redundancy. - Reason this comment was not posted:
Comment was on unchanged code.
3. agents-api/agents_api/models/utils.py:430
- Draft comment:
Ensureasync_wrapper
handles exceptions similarly towrapper
for consistent error handling. - Reason this comment was not posted:
Confidence changes required:50%
Theasync_wrapper
inwrap_in_class
should handle exceptions similarly towrapper
to ensure consistent error handling.
Workflow ID: wflow_guvoWKegwLcBOSR9
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Signed-off-by: Diwank Singh Tomer <[email protected]>
There was a problem hiding this 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 d20f2e5 in 10 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/pyproject.toml:55
- Draft comment:
Ensure that changingpycozo-async
from a git URL to a version number does not affect compatibility or functionality. Verify that version^0.7.6
meets all requirements. - Reason this comment was not posted:
Confidence changes required:50%
The change from a git URL to a version number for thepycozo-async
dependency is a significant change. This should be verified for compatibility and functionality.
Workflow ID: wflow_OYSqf1Aa9M2YwJX7
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this 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 9ce2d6b in 11 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/metrics/counters.py:27
- Draft comment:
Ensure thatfunc
is a coroutine before usingawait
. The current implementation correctly checks this withinspect.iscoroutinefunction(func)
before returningasync_wrapper
, so the change is appropriate. - Reason this comment was not posted:
Confidence changes required:0%
The change fromreturn func(*args, **kwargs)
toreturn await func(*args, **kwargs)
in theasync_wrapper
is correct for handling asynchronous functions. However, theasync_wrapper
should ensure thatfunc
is indeed a coroutine function before usingawait
. The current implementation already checks this withinspect.iscoroutinefunction(func)
before returningasync_wrapper
, so the change is appropriate.
Workflow ID: wflow_8Z3UeM42NMV1cyLb
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Signed-off-by: Diwank Singh Tomer <[email protected]>
There was a problem hiding this 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 3a32c7c in 34 seconds
More details
- Looked at
72
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. agents-api/agents_api/activities/task_steps/prompt_step.py:1
- Draft comment:
Callable
import removed but still used in commented code. Re-add if uncommenting later. - Reason this comment was not posted:
Confidence changes required:50%
The import statement forCallable
inprompt_step.py
is removed but still used in the commented-out code. If the commented code is to be used later, this import might be necessary.
2. agents-api/agents_api/autogen/Tasks.py:9
- Draft comment:
Unused importJinjaTemplate
removed. This is a valid change. - Reason this comment was not posted:
Confidence changes required:0%
The import statement forJinjaTemplate
inTasks.py
is removed but not used anywhere else in the file. This is a valid removal.
3. agents-api/tests/sample_tasks/simple_multi_step.yaml:23
- Draft comment:
Modifiedevaluate
step to handle multiple items. This aligns with async transition intent. - Reason this comment was not posted:
Confidence changes required:0%
The change insimple_multi_step.yaml
modifies theevaluate
step to handle multiple items. This change seems correct and aligns with the intent to make transitions queries async.
Workflow ID: wflow_htQNTImBWSaKaQeE
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Make transition queries asynchronous by adding async functions and clients, updating decorators, and fixing minor issues.
create_execution_transition_async
increate_execution_transition.py
for async transition creation.transition_step
intransition_step.py
to usecreate_execution_transition_async
.get_async_cozo_client
incozo.py
for async Cozo client.cozo_query_async
decorator inutils.py
for async query handling.increase_counter
incounters.py
to support async functions.None
error inchat.py
when formatting tools.pycozo-async
dependency inpyproject.toml
.This description was created by for 3a32c7c. It will automatically update as commits are pushed.