-
Notifications
You must be signed in to change notification settings - Fork 900
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
Ravi praveen patch 2 #618
Ravi praveen patch 2 #618
Conversation
Key Changes: Modular Functions: The script is now organized into functions for logging actions, compiling TypeSpec, and running Poetry tasks. Logging: Introduced log_action for logging actions and errors with timestamps. This helps track what the script is doing in real-time. Error Handling: Added || { ... } constructs to gracefully handle errors and log them. Optional Poetry Update: The --update-poetry flag is available to update Poetry dependencies before running tasks. If not passed, Poetry runs without updating. Execution Time: Logs the total time taken for the script to execute, making it easier to track performance.
Update generate_openapi_code.sh
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 9034dd7 in 19 seconds
More details
- Looked at
207
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. scripts/generate_openapi_code.sh:7
- Draft comment:
Redundant 'set -e' as 'set -xe' already includes 'set -e'. Consider removing this line. - Reason this comment was not posted:
Confidence changes required:50%
The script uses 'set -xe' and 'set -e' which is redundant. 'set -e' is already included in 'set -xe'.
2. scripts/generate_openapi_code.sh:14
- Draft comment:
Consider removing 'tee' if console output is not needed, as it duplicates the log entry to both the console and the log file. - Reason this comment was not posted:
Confidence changes required:33%
The 'log_action' function is used to log actions with timestamps, but the 'tee' command is used, which might not be necessary if the output is only needed in the log file.
3. typespec/tools/models.tsp:49
- Draft comment:
Consider using a more specific type instead of 'Record' for 'ToolOutput' to improve type safety and clarity. This comment also applies to 'data' in 'ApiCallDef'. - Reason this comment was not posted:
Confidence changes required:50%
The 'FunctionParameters' alias in 'models.tsp' is defined with a specific structure, but the 'Record' type for 'ToolOutput' and 'data' in 'ApiCallDef' is too generic and might benefit from more specific typing.
4. typespec/tools/models.tsp:125
- Draft comment:
Consider including 'arguments?: FunctionParameters;' in 'CreateUserSystemDef' for consistency with 'SystemDef'. - Reason this comment was not posted:
Confidence changes required:50%
The 'CreateUserSystemDef' model extends 'SystemDef' but does not include 'arguments', which might be necessary for consistency and functionality.
Workflow ID: wflow_0KSUWYEYwL5ZVcIL
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Closing as duplicate of #615 |
Summary of Changes:
Granular System Definition: Introduced CreateUserSystemDef as an example of a more specific system call.
Custom Tool Type: Added a custom option to the ToolType enum for future extensibility.
API Call Enhancements: Added fields for retries, rate_limit, page_size, and page_number to ApiCallDef for better error handling and pagination.
Function Parameters: Refined FunctionParameters with more structure and validation (type, required, default).
Tool Logging: Added a log field in the Tool model for logging tool actions (e.g., user, action time).
Improved Comments and Documentation: Added comments to fields for better clarity.
Important
Enhances system and tool definitions with new models, error handling, and logging, and updates script for better logging and error handling.
CreateUserSystemDef
model for specific user creation system calls inmodels.tsp
.custom
option inToolType
enum for future extensibility inmodels.tsp
.ApiCallDef
with fields forretries
,rate_limit
,page_size
, andpage_number
for better error handling and pagination inmodels.tsp
.FunctionParameters
with structured validation inmodels.tsp
.log
field inTool
model for logging actions inmodels.tsp
.generate_openapi_code.sh
to include logging with timestamps and error handling.generate_openapi_code.sh
.This description was created by for 9034dd7. It will automatically update as commits are pushed.