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

Restrict role values in chatml-schema #3

Merged
merged 3 commits into from
May 27, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented May 27, 2024

Updates the specs/chatml-schema.json schema to restrict the role property values.

  • Adds an enum constraint to the role property, specifying the allowed values as system, user, assistant, tool_calls, tool_response. This ensures that the role field in the ChatML Message schema can only contain one of these predefined values.

For more details, open the Copilot Workspace session.


🚀 This description was created by Ellipsis for commit bd9e595

Summary:

Updates the chatml-schema.json to restrict role values to system, user, assistant, tool_calls, tool_response by adding an enum constraint.

Key points:

  • Updates specs/chatml-schema.json
  • Adds enum constraint to role property
  • Allowed values: system, user, assistant, tool_calls, tool_response

Generated with ❤️ by ellipsis.dev

Copy link

@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 bd9e595 in 33 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. specs/chatml-schema.json:8
  • Draft comment:
    The addition of the enum constraint to the role property is a good practice for ensuring data consistency and validation. The specified values cover a comprehensive range of roles for a chat system.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR adds an enum constraint to the 'role' property in the ChatML schema. This is a good practice as it restricts the values to a predefined set, ensuring data consistency and validation at the schema level. The values provided ('system', 'user', 'assistant', 'tool_calls', 'tool_response') seem appropriate for different roles in a chat system. There is no indication of missing or incorrect values based on the PR description. The change is localized to the 'role' property and does not affect other parts of the schema.

Workflow ID: wflow_YUmwJvH0A8bRYhws


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

@creatorrr creatorrr merged commit dbb15e6 into main May 27, 2024
1 check passed
@creatorrr creatorrr deleted the creatorrr/restrict-role-values branch May 27, 2024 03:39
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.

1 participant