-
Notifications
You must be signed in to change notification settings - Fork 911
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(agents-api): added anthropic call in chat endpoint + typespec changed to include imageurl in ChatInput #835
base: dev
Are you sure you want to change the base?
Conversation
…nged to include imageurl in ChatInput
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.
Left you a comment on the typespec changes.
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.
❌ Changes requested. Reviewed everything up to 1bdc875 in 1 minute and 16 seconds
More details
- Looked at
1606
lines of code in10
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. agents-api/agents_api/autogen/Chat.py:165
- Draft comment:
There are multiple unused classes likeContentItemModel1
,ContentItemModel3
, etc. Consider removing them to clean up the code. This applies to other files as well. - Reason this comment was not posted:
Confidence changes required:50%
The code has multiple instances of unused classes likeContentItemModel1
,ContentItemModel3
, etc. These should be removed to clean up the code.
2. agents-api/agents_api/routers/sessions/chat.py:144
- Draft comment:
Thefiltered_tools
variable is defined but not used in theclient.beta.messages.create
call. Ensure that the correct tools are being passed to the API call. - Reason this comment was not posted:
Comment did not seem useful.
3. integrations-service/integrations/utils/integrations/remote_browser.py:231
- Draft comment:
Consider using a dictionary to map key combinations for better readability and maintainability instead of multiple inline conditions. - Reason this comment was not posted:
Confidence changes required:50%
Thepress_key
function inremote_browser.py
has a hardcoded mapping for certain keys. This could be improved by using a dictionary for better readability and maintainability.
Workflow ID: wflow_ole82FLotQgwUiOz
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.
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 615bd27 in 22 seconds
More details
- Looked at
90
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/routers/sessions/chat.py:33
- Draft comment:
The import forget_handler_with_filtered_params
is removed, but it is still used in the commented-out code. If you plan to uncomment this in the future, ensure the import is restored. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_SPDdj3fKhwrSUP1V
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Lgtm. If Hamada’s comments are addressed then merge |
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 e4dc3f4 in 25 seconds
More details
- Looked at
51
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. llm-proxy/litellm-config.yaml:24
- Draft comment:
Consider addingapi_key: os.environ/GEMINI_API_KEY
to ensure the GEMINI_API_KEY is utilized for thegemini-1.5-pro
model. - 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 already implemented for the new 'gemini-1.5-pro' models added in the diff. The existing 'gemini-1.5-pro' model at line 22 uses 'vertex_credentials', which might be a different configuration. The comment does not provide strong evidence that a change is required, as the configuration might be intentional.
I might be missing the context of why 'vertex_credentials' is used instead of an API key for the 'gemini-1.5-pro' model at line 22. However, without strong evidence that this is incorrect, the comment seems speculative.
The use of 'vertex_credentials' instead of an API key could be intentional for a specific environment or setup, and without evidence that this is incorrect, the comment should not be kept.
The comment should be deleted as it suggests a change that is already implemented for the new models and does not provide strong evidence that the existing configuration is incorrect.
Workflow ID: wflow_n1LPUAFJXADQwxVh
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 c118e9c in 17 seconds
More details
- Looked at
45
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/activities/execute_integration.py:52
- Draft comment:
The condition checking for an error inintegration_service_response
can be simplified toif integration_service_response.get("error"):
. This is more concise and Pythonic. - Reason this comment was not posted:
Confidence changes required:10%
The change in the condition to check for 'error' in the response is correct, but the logic can be simplified.
Workflow ID: wflow_i2wfZVI5qur4J4WS
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.
❌ Changes requested. Incremental review on 1ea6188 in 28 seconds
More details
- Looked at
41
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/activities/execute_system.py:99
- Draft comment:
Ensurehandler
is called withawait
if it is an async function to avoid unexpected behavior.
return await handler(
- Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The code already has a check for coroutine functions and uses 'await' when necessary. The comment seems to be suggesting something that is already handled by the code logic. The comment is not necessary as the code is correctly structured to handle async functions.
I might be missing some context about why the comment was made, but based on the code provided, it seems redundant. The code logic appears to be correct in handling async functions.
The code explicitly checks for coroutine functions and uses 'await' appropriately, so the comment does not add value. The logic is clear and does not require additional comments.
The comment should be deleted as the code already handles the use of 'await' for async functions correctly, making the comment redundant.
Workflow ID: wflow_LUW5x3rnaFHVnyd0
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.
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.
❌ Changes requested. Incremental review on a59934a in 21 seconds
More details
- Looked at
150
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_w5MWfPeL4DQqbdvL
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.
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 1b900d4 in 12 seconds
More details
- Looked at
56
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/gunicorn_conf.py:8
- Draft comment:
The logic for determining the number of workers is duplicated in bothagents-api/gunicorn_conf.py
andintegrations-service/gunicorn_conf.py
. Consider refactoring this logic into a shared utility to avoid code duplication. - Reason this comment was not posted:
Confidence changes required:50%
The logic for determining the number of workers is duplicated in both gunicorn configuration files. This should be refactored to avoid code duplication.
Workflow ID: wflow_0flx7eGJIleMxtp2
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 3c71595 in 11 seconds
More details
- Looked at
64
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/workflows/task_execution/helpers.py:70
- Draft comment:
Consider creating a helper function to append a new workflow to the existing list of workflows. This pattern is repeated inexecute_switch_branch
,execute_if_else_branch
,execute_foreach_step
,execute_map_reduce_step
, andexecute_map_reduce_step_parallel
. - Reason this comment was not posted:
Confidence changes required:50%
The code is repeating the pattern of appending a new workflow to the existing list of workflows in multiple functions. This pattern is consistent and seems intentional, but it could be optimized by creating a helper function to avoid repetition and potential errors in future modifications.
Workflow ID: wflow_QgO8Xau45Xb9pW3S
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.
❌ Changes requested. Incremental review on 8c6329b in 36 seconds
More details
- Looked at
107
lines of code in4
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/routers/sessions/chat.py:238
- Draft comment:
Consider adding exception handling for the API call to handle potential errors gracefully. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_hgPQt3Bb6boU9hDi
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.
… into x/computer-use-demo
… into x/computer-use-demo
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 057e60b in 31 seconds
More details
- Looked at
125
lines of code in7
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_XdvDSpfpBnb8cMw7
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.
❌ Changes requested. Incremental review on 25aa9a0 in 49 seconds
More details
- Looked at
373
lines of code in22
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. agents-api/agents_api/activities/embed_docs.py:16
- Draft comment:
The use ofdeep=True
in theauto_blob_store
decorator is consistent across multiple files. Ensure this change is necessary and does not introduce unintended side effects. This applies to other files as well. - Reason this comment was not posted:
Confidence changes required:50%
The use ofdeep=True
in theauto_blob_store
decorator is consistent across multiple files. This change should be verified to ensure it is necessary and does not introduce any unintended side effects.
2. agents-api/agents_api/common/storage_handler.py:44
- Draft comment:
Theload_from_blob_store_if_remote
function now handlesRemoteList
by converting it to a list. Ensure this change is necessary and does not introduce unintended side effects. - Reason this comment was not posted:
Confidence changes required:50%
Theload_from_blob_store_if_remote
function now handlesRemoteList
by converting it to a list. This change should be verified to ensure it is necessary and does not introduce any unintended side effects.
Workflow ID: wflow_yHNgvxFJNcH7H0xI
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.
Important
Added Anthropic API call in chat endpoint, updated models for image content, and improved tool formatting and error handling.
chat.py
for tool typescomputer_20241022
,bash_20241022
,text_editor_20241022
.request_anthropic()
to format messages and call Anthropic API.chat.py
for Anthropic tools.ChatMLAnthropicImageContentPart
and related models inmodels.tsp
for Anthropic image content.ChatMLContentPart
alias to includeChatMLAnthropicImageContentPart
.openapi-1.0.0.yaml
to reflect changes inChatInput
and related schemas.Source
class inChat.py
,Entries.py
, andTasks.py
for base64 image data.execute_integration.py
andexecute_system.py
.gunicorn_conf.py
for testing and debugging.GEMINI_API_KEY
to.env.example
anddocker-compose.yml
.This description was created by for 25aa9a0. It will automatically update as commits are pushed.