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

Add minItems to ToolkitTask actions schema #725

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Conversation

collindutter
Copy link
Member

No description provided.

@collindutter collindutter changed the title Add minItems to ToolkitTask actions schema Add minItems and uniqueItems to ToolkitTask actions schema Apr 2, 2024
@@ -10,6 +10,133 @@


class TestToolTask:
TARGET_TOOLS_SCHEMA = {
Copy link
Member Author

Choose a reason for hiding this comment

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

Originally added this to validate the existence of minItems in the schema, but now it is being added during prompt rendering. Can remove these tests, but I think there is value in having them.

@collindutter collindutter changed the title Add minItems and uniqueItems to ToolkitTask actions schema Add minItems to ToolkitTask actions schema Apr 2, 2024
)

self.actions.append(
self.__error_to_action(f"Activity input JSON validation error: {error_message}")
Copy link
Member

Choose a reason for hiding this comment

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

Can we raise a schema.SchemaError instead so it's more consistent with the rest of the validation logic?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call, updated.

@collindutter collindutter merged commit af48466 into dev Apr 2, 2024
6 checks passed
@collindutter collindutter deleted the fix/min-input branch April 2, 2024 20:12
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.

None yet

2 participants