outlines icon indicating copy to clipboard operation
outlines copied to clipboard

Add support for URI format in JSON schema validation

Open Muhtasham opened this issue 1 year ago • 1 comments

This PR adds support for the URI format in JSON schema validation. Previously, attempting to use the "uri" format in a schema would raise a NotImplementedError especially when serving with vLLM.

This change implements regex support for URI validation, allowing users to specify URI fields in their guided JSON requests.

Muhtasham avatar Sep 21 '24 02:09 Muhtasham

Awesome, and good idea to refactor this! Would you mind adding a couple of tests?

rlouf avatar Sep 21 '24 07:09 rlouf

Hi @Muhtasham! We recently released Outlines v1. Turning a json schema into a regex is now handled in outlines-core. As the URI format is already supported there, I'm going to close the PR.

RobinPicard avatar Jun 19 '25 16:06 RobinPicard