Skip to content
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(agents-api): Add YAML support #464

Merged
merged 6 commits into from
Aug 20, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Aug 20, 2024

  • fix(agents-api): Fix the typespec bug and regenerate
  • refactor(agents-api): Minor refactors
  • fix(agents-api): Temporal local activities are too unreliable
  • fix(agents-api): Fix the codec, which was causing a lot of bugs
  • refactor(agents-api): Minor refactors
  • feat(agents-api): Add YAML support

🚀 This description was created by Ellipsis for commit 9962356

Summary:

This PR adds YAML support to the agents-api, refactors logging, fixes codec issues, updates models and SDKs, and enhances TypeSpec definitions.

Key points:

  • Feature: Added YAML support via YamlMiddleware in agents-api/agents_api/middleware.py.
  • Refactor: Replaced logging with activity.logger in task step files for error logging.
  • Bug Fix: Fixed codec issues in agents-api/agents_api/worker/codec.py.
  • Update: Modified pydantic models to allow extra fields and strict types.
  • Test: Added tests for YAML input in agents-api/tests/test_workflow_routes.py.
  • SDK Update: Updated TypeScript and Python SDKs to reflect new API changes.
  • TypeSpec Update: Updated TypeSpec files to align with new API features.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 9962356 in 1 minute and 10 seconds

More details
  • Looked at 5649 lines of code in 55 files
  • Skipped 3 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. sdks/python/julep/api/types/tasks_tool_call_step.py:18
  • Draft comment:
    Ensure that the arguments field uses typing.Dict[str, CommonPyExpression] consistently across all Python files, as it is correctly done here. This matches the TypeScript equivalent Record<string, Common_PyExpression>.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The code in the Python files uses typing.Dict[str, CommonPyExpression] for the arguments field in ToolCallStep, which is consistent across different files. However, in the TypeScript files, the arguments field is defined as Record<string, Common_PyExpression>, which is the correct equivalent in TypeScript. This consistency is good and should be maintained.

Workflow ID: wflow_KCYtdRW8Z0OHkyxH


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

]:
return await call_next(request)

# Parse the YAML body into a Python object
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be wrapped inside a 400 try except

@@ -89,6 +91,11 @@ def register_exceptions(app: FastAPI) -> None:
max_age=3600,
)

app.add_middleware(GZipMiddleware, minimum_size=1000, compresslevel=3)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Authorization logic should be moved into a middleware and executed before any parsing begins

@whiterabbit1983 whiterabbit1983 merged commit 8263aea into dev-tasks-disable-routes Aug 20, 2024
2 of 5 checks passed
@whiterabbit1983 whiterabbit1983 deleted the f/yaml-task-create branch August 20, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants