-
Notifications
You must be signed in to change notification settings - Fork 907
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
feat: Add basic support for integration tools to ToolStep #519
Conversation
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! Reviewed everything up to a914e7c in 1 minute and 2 seconds
More details
- Looked at
283
lines of code in3
files - Skipped
1
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. agents-api/agents_api/autogen/Tools.py:51
- Draft comment:
Consider replacingintegration: Any | None = None
withintegration: IntegrationDef | None = None
for consistency and type safety. This applies tosystem
as well. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is suggesting a change that has already been made in the diff. Since the change is already implemented, the comment is no longer necessary. The purpose of the comment is to suggest a change for consistency and type safety, which has been addressed.
I might be missing if there are other instances in the file where the change hasn't been applied, but the comment specifically refers to the lines that have been changed.
The comment specifically refers to the lines that have been changed, and since those changes are already made, the comment is redundant.
The comment should be deleted because the suggested change has already been implemented in the diff.
2. agents-api/agents_api/autogen/Tools.py:182
- Draft comment:
Consider replacingintegration: Any | None = None
withintegration: IntegrationDef | None = None
for consistency and type safety. This applies tosystem
as well. - Reason this comment was not posted:
Marked as duplicate.
3. agents-api/agents_api/autogen/Tools.py:292
- Draft comment:
Consider replacingintegration: Any | None = None
withintegration: IntegrationDef | None = None
for consistency and type safety. This applies tosystem
as well. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_CIKTEvwxcVKTCt3i
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 6af879f in 47 seconds
More details
- Looked at
798
lines of code in9
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. agents-api/agents_api/autogen/Common.py:16
- Draft comment:
Theroot
attribute inJinjaTemplate
is not initialized. Consider initializing it in the constructor or setting a default value. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment suggests a change that is not consistent with the rest of the file, where similar classes do not initialize 'root'. This suggests that the current pattern is intentional and likely correct. Without strong evidence that this is an issue, the comment should be removed.
I might be missing specific knowledge about the 'RootModel' class and its requirements. However, the consistency across the file suggests that the current implementation is correct.
The consistency in the file indicates that the current implementation is likely correct, and without strong evidence to the contrary, the comment should be removed.
Remove the comment as it suggests a change that is inconsistent with the rest of the file and lacks strong evidence of being an issue.
2. agents-api/agents_api/autogen/Sessions.py:46
- Draft comment:
Theforward_tool_results
attribute is repeated across multiple classes. Consider refactoring to avoid redundancy. - Reason this comment was not posted:
Confidence changes required:50%
Theforward_tool_results
attribute is repeated across multiple classes inSessions.py
. This could be refactored to avoid redundancy.
3. agents-api/agents_api/autogen/Tasks.py:691
- Draft comment:
Theforward_tool_results
attribute is repeated across multiple classes. Consider refactoring to avoid redundancy. - Reason this comment was not posted:
Confidence changes required:50%
Theforward_tool_results
attribute is repeated across multiple classes inTasks.py
. This could be refactored to avoid redundancy.
4. agents-api/agents_api/autogen/Tools.py:92
- Draft comment:
Theprovider
attribute inIntegrationDef
andIntegrationDefUpdate
is well-defined usingLiteral
for valid providers. This ensures only valid providers are used. - Reason this comment was not posted:
Confidence changes required:0%
Theprovider
attribute inIntegrationDef
andIntegrationDefUpdate
is defined as aLiteral
with specific values. This is a good practice for ensuring only valid providers are used.
Workflow ID: wflow_vAqmOM0pkSUMtc8G
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Signed-off-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
…rovider) Signed-off-by: Diwank Singh Tomer <[email protected]>
…ions 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 a49aa12 in 46 seconds
More details
- Looked at
342
lines of code in6
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/migrations/migrate_1727235852_add_forward_tool_calls_option.py:15
- Draft comment:
The migration script should handle existing "auto" values in the database and convert them toNone
to maintain consistency with the updated logic in the codebase. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment seems speculative as it mentions 'auto' values which are not present in the script. The script already sets the new field tonull
, which aligns with the comment's suggestion. The comment does not point out a clear issue with the current code.
I might be missing some context about how 'auto' values are handled elsewhere in the codebase, but based on the provided script, there is no indication of such values.
Given the script's current state, the comment does not address a specific issue in the code. It seems to be speculative and not directly relevant to the changes made.
The comment should be deleted as it does not address a specific issue in the code and seems speculative.
Workflow ID: wflow_mjimB8O79r9TAVKU
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
merged_tool_args = get_tool_args_from_metadata( | ||
developer_id=developer_id, agent_id=agent_id, task_id=task_id | ||
) | ||
|
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.
need to also merge in integration.arguments
Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > This PR updates the handling of integrations and systems by adding new models, updating workflows, and modifying session options, along with dependency updates and a migration script. > > - **Behavior**: > - Adds `execute_integration` function in `execute_integration.py` to handle integration tool calls. > - Updates `prompt_step.py` to handle unwrapping of prompt responses and tool call results. > - Modifies `tool_call_step.py` to handle tool calls using `Tool` model. > - **Models**: > - Adds `IntegrationDef` and `SystemDef` models in `Tools.py`. > - Updates `CreateToolRequest`, `PatchToolRequest`, `UpdateToolRequest`, and `Tool` to use `IntegrationDef` and `SystemDef`. > - Adds `forward_tool_results` option to session models in `Sessions.py`. > - **Workflow**: > - Updates `TaskExecutionWorkflow` in `task_execution/__init__.py` to handle integration tool calls. > - **Dependencies**: > - Updates `@typespec/*` dependencies in `package.json` to version `0.60.x`. > - **Migration**: > - Adds migration script `migrate_1727235852_add_forward_tool_calls_option.py` to add `forward_tool_calls` option to sessions. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for a49aa12. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer [email protected]
Important
This PR updates the handling of integrations and systems by adding new models, updating workflows, and modifying session options, along with dependency updates and a migration script.
execute_integration
function inexecute_integration.py
to handle integration tool calls.prompt_step.py
to handle unwrapping of prompt responses and tool call results.tool_call_step.py
to handle tool calls usingTool
model.IntegrationDef
andSystemDef
models inTools.py
.CreateToolRequest
,PatchToolRequest
,UpdateToolRequest
, andTool
to useIntegrationDef
andSystemDef
.forward_tool_results
option to session models inSessions.py
.TaskExecutionWorkflow
intask_execution/__init__.py
to handle integration tool calls.@typespec/*
dependencies inpackage.json
to version0.60.x
.migrate_1727235852_add_forward_tool_calls_option.py
to addforward_tool_calls
option to sessions.This description was created by for a49aa12. It will automatically update as commits are pushed.