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 validation for request schemas #202

Closed
3coins opened this issue May 31, 2023 · 1 comment · Fixed by #261
Closed

Add validation for request schemas #202

3coins opened this issue May 31, 2023 · 1 comment · Fixed by #261
Assignees
Labels
enhancement New feature or request @jupyter-ai/chatui

Comments

@3coins
Copy link
Collaborator

3coins commented May 31, 2023

Summary

SageMaker endpoint settings in the chat panel doesn't have any validation for the request and response schemas. This can trip users who might copy the schemas from notebooks mostly in python which might not be interoperable and decodable when passed between the JS and Python. Users currently will not realize this error until they ask a question in the chat panel.

An example of an input schema for the flan-t5-xl model that caused this error for me.

{"text_inputs":"<prompt>", "max_length":50, "num_return_sequences":3, "top_k":50, "top_p":0.95, "do_sample":True}

The last value is incorrect as it is not a valid JSON value, should be true instead of True.

Proposed Solution

Add json validation for request and response schemas in the settings panel.

@3coins 3coins added the enhancement New feature or request label May 31, 2023
@JasonWeill JasonWeill added this to the 0.10.0 Release milestone Jul 5, 2023
@JasonWeill JasonWeill self-assigned this Jul 6, 2023
@JasonWeill
Copy link
Collaborator

To clarify, the request schema should be validated as JSON, and the response path should be validated as JSONPath.

@JasonWeill JasonWeill changed the title Add validation for request and response schemas Add validation for request schemas Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/chatui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants