-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Validate JSON for request schema #261
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
fcebeea
to
842400d
Compare
@JasonWeill |
@3coins This change also affects the settings panel, although I didn't include a screen shot of it |
Co-authored-by: david qiu <[email protected]>
* Corrects capitalization for SageMaker endpoint * WIP: Pass expected format in model for field * Validates JSON using JSON.parse * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * WIP: Validate JSON in magics * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix reference to error * Update packages/jupyter-ai-magics/jupyter_ai_magics/magics.py Co-authored-by: david qiu <[email protected]> * Avoids redundant parameter --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: david qiu <[email protected]>
* Corrects capitalization for SageMaker endpoint * WIP: Pass expected format in model for field * Validates JSON using JSON.parse * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * WIP: Validate JSON in magics * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix reference to error * Update packages/jupyter-ai-magics/jupyter_ai_magics/magics.py Co-authored-by: david qiu <[email protected]> * Avoids redundant parameter --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: david qiu <[email protected]>
Fixes #202 (request schema only).
Validates JSON for the SageMaker endpoint's request schema. (The response path is JsonPath, for which I haven't found a good parser/validator yet.) This change affects both the magic commands and the chat UI.
In the following example, a correct schema (blue arrow) is accepted, while an incorrect schema (red arrow) is rejected with an exception.