generative-ai-js icon indicating copy to clipboard operation
generative-ai-js copied to clipboard

Use lowercase SchemaType enum values

Open mike-marcacci opened this issue 1 year ago • 1 comments

This fixes the serialized values of the SchemaType enum to follow the swagger doc referenced in comments, and the json-schema spec upon which the swagger spec is based.

This change makes this package compatible with the myriad other tools (like AJV) that allow the definition of validators, types, etc using standard json-schema.

I've tested sending lowercased values to gemini, and this appears to work perfectly, despite the TypeScript errors that this PR resolves.

mike-marcacci avatar Aug 19 '24 18:08 mike-marcacci

Thanks! Can you do 2 things: Run yarn docs to regenerate reference docs. Run yarn changeset to generate a changeset file (choose "minor" as this causes an API surface change).

hsubox76 avatar Aug 20 '24 16:08 hsubox76

Hi @hsubox76 - thanks for reiterating what y'all already had in the contributing docs, and sorry for not reading those first! 🤦🏼

I've updated and rebased this PR accordingly.

mike-marcacci avatar Aug 26 '24 19:08 mike-marcacci

Just wanted to kindly nudge this, at least to let the unit tests run. Thanks!

mike-marcacci avatar Sep 05 '24 18:09 mike-marcacci

I'm waiting for this!

navarrodiego avatar Sep 11 '24 20:09 navarrodiego

Is this PR solving https://github.com/google-gemini/generative-ai-js/issues/153

huytool157 avatar Sep 12 '24 21:09 huytool157