drops icon indicating copy to clipboard operation
drops copied to clipboard

JSON schema

Open torepettersen opened this issue 10 months ago • 5 comments

Hi and tanks for creating this lovley validation library.

It seems like it would fit quite nice for validating JSON responses returned from OpenAI and other LLM's.

LLM's usually require a JSON Schema as input. For this reason it would be quite convenient if it would be possible to auto generate a JSON schema from the Drops schema. Would auto generating of the JSON Schema be something that makes sense to add to the Drops library?

torepettersen avatar Mar 27 '24 22:03 torepettersen

@torepettersen hey thanks! Yes JSON schema generator is on the roadmap 🙂

solnic avatar Mar 29 '24 12:03 solnic

Very nice :blush:

Would you be interesetd in contributions? And in that case have you made yourself some thoughts around how to add descriptions? I guess it would be possible to start without, but seems like the schema needs to be extended somehow to add that.

torepettersen avatar Mar 30 '24 19:03 torepettersen

Thank you, yes but after I'm done with the core functionality, which I plan to finalize in ver 1.0

solnic avatar May 04 '24 16:05 solnic

I made a fork where I started to add the functionality. Feel free to ping me when the core functionality is stable enough for me to open PR's. You could also feel free to just steal it, if you prefer that.

torepettersen avatar Jun 08 '24 11:06 torepettersen

@torepettersen ohh that's great, thanks! will do 😄

solnic avatar Jun 10 '24 15:06 solnic