-
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
feat: Added temporal codec server route & cookbooks. Updated the CONTRIBUTING.md file #543
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.
❌ Changes requested. Reviewed everything up to 485e885 in 17 seconds
More details
- Looked at
219
lines of code in6
files - Skipped
4
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/routers/internal/router.py:30
- Draft comment:
Thedecode_payloads
function should return a JSON response, not aResponse
object. Consider changing the return type hint todict
orJSONResponse
. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_3vqkZkUCpPNGzqSR
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.
|
||
# Decode route | ||
@router.post("/temporal/decode", tags=["temporal"]) | ||
async def decode_payloads(req: Request)-> Response: |
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.
The decode_payloads
function should return a JSON response, not a Response
object. Consider changing the return type hint to dict
or JSONResponse
.
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.
we should change return type to -> dict
CONTRIBUTING.md
Outdated
|
||
```bash | ||
npm install -g jwt-cli |
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.
no the lib is different: cargo install jwt-cli --locked
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.
for cargo installation the users might require extra set installation like Rust and Cargo. Instead can we just ask to install 'jwt-cli' depending on their platform?
cookbooks/03_Cookbook.ipynb
Outdated
"\n", | ||
"To recreate the notebook and see the code implementation for this task, you can access the Google Colab notebook using the link below:\n", | ||
"\n", | ||
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/14ntgAPmm2-QD3KArc5-lyM5wCMyTx5b1/view?usp=drive_link)\n", |
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.
This isn't the correct link. Use https://openincolab.com/ to generate it but make sure to change the branch name to dev
cookbooks/04_Cookbook.ipynb
Outdated
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"We get the current agent ID from the list of agents." |
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.
remove the list agents, list tasks, etc. they are useless distractions
cookbooks/04_Cookbook.ipynb
Outdated
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ |
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.
mention that list transitions doesnt wait, just lists whatever transitions have happened so far
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.
and move .list()
above .stream()
cookbooks/04_Cookbook.ipynb
Outdated
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Streaming execution steps of the defined Task." |
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.
Mention that this is a blocking operation, waits for the execution to get over
Also- change names of the cookbook files to something more descriptive like |
Also run |
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.
It would be better if you show the final output of the task execution in the cookbooks.
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 e8238b2 in 24 seconds
More details
- Looked at
96
lines of code in3
files - Skipped
4
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. agents-api/agents_api/routers/internal/router.py:15
- Draft comment:
Consider adding error handling for JSON parsing and payload conversion to handle potential exceptions and provide meaningful error responses. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is actionable and suggests a code quality improvement by adding error handling, which is a valid point. The current code does not handle exceptions that might occur during JSON parsing or payload conversion, which could lead to unhandled exceptions and unclear error responses.
The comment does not specify exactly how to implement the error handling, which might make it less actionable. However, the suggestion is clear enough to be useful for a developer to consider adding try-except blocks or similar error handling mechanisms.
While the comment does not provide specific implementation details, it highlights a potential issue that could improve the robustness of the code. This makes it a valuable comment to keep.
Keep the comment as it suggests a valid improvement to the code by adding error handling for potential exceptions.
2. agents-api/agents_api/routers/internal/router.py:14
- Draft comment:
The return type ofdecode_payloads
should beResponse
instead ofdict
to align with FastAPI's expected return types. - 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 necessary because FastAPI supports returning a dictionary, which it automatically converts to a JSON response. The change in the diff is intentional and aligns with FastAPI's capabilities. Therefore, the comment is not correct as it suggests an unnecessary change.
I might be missing some specific context about the project's coding standards or specific requirements that necessitate usingResponse
. However, based on general FastAPI usage, returning a dictionary is acceptable.
The general practice in FastAPI is to allow returning dictionaries for JSON responses, and unless there is a specific project requirement, the current implementation is correct.
The comment should be deleted because it suggests an unnecessary change. The current return type ofdict
is valid in FastAPI.
3. CONTRIBUTING.md:71
- Draft comment:
Typo: Replace "fopr" with "for". - Reason this comment was not posted:
Confidence changes required:10%
TheCONTRIBUTING.md
file contains a minor typo that should be corrected for clarity.
4. CONTRIBUTING.md:89
- Draft comment:
Consider reverting the change to use{JWT_SHARED_KEY}
to indicate that it is a placeholder to be replaced by the user. - Reason this comment was not posted:
Confidence changes required:50%
TheCONTRIBUTING.md
file has an unnecessary change where the curly braces were removed from the JWT_SHARED_KEY placeholder. This could lead to confusion for users.
Workflow ID: wflow_U4Ma66jVM2VvMVfD
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Added
/temporal/decode
route, updated setup instructions inCONTRIBUTING.md
, and modified Docker and FastAPI configurations./temporal/decode
route inrouter.py
for decoding temporal payloads usingPydanticEncodingPayloadConverter
.CONTRIBUTING.md
with setup instructions, including environment setup, Docker volume creation, and running the project in single or multi-tenant mode.internal.router
toweb.py
to include the new internal routes.docker-compose.yml
to expose port8080
foragents-api
andagents-api-multi-tenant
services.This description was created by for e8238b2. It will automatically update as commits are pushed.