JSON Schema Optional Fields

Per https://console.groq.com/docs/structured-outputs#schema-requirements we are told:

Optional fields are not supported.

However on the same page (https://console.groq.com/docs/structured-outputs#support-ticket-classification), in the example code for using zod schemas, there are multiple optional fields:


company: z.string().optional(),

follow_up_date: z.string().datetime().optional(),
So, which is it, are optional fields allowed or not?

Thanks for putting that together, looks really good! This is going to be so useful for the many .NET developers out there!

Did you reply to the wrong thread? I didn’t do anything for the .NET community?

sorry the migration had a few user assigning issues; I’ll get those sorted out asap

@yawnxyz my comment is still attributed to paweljanda

working on one massive user switch after the new oauth user migrations! (They’ll have to point to the new migrated user accounts; Gainsight’s old user<>post schema was a bit unwieldy as they didn’t have post uuids, which led to some errors)

Is there a timeline on when this might be finished? My post is still attributed to paweljanda above.

I’ve manually changed it - please let me know if there are other mis-attributed threads!