@IntelliJJ I’ll do my best to provide feedback – your Schema is complex and it’s in Dutch, which I do not understand.
-
Missing
"required"
property keyword:
You should specify which, if any, parameter properties are “required”.
In the example below, I’ve made all of them required. If none are required, then “required” should be an empty list.
-
Verify implementation of
"patternProperties"
:
Your implementation of"patternProperties"
looks odd. What exactly are you trying to achieve?
The error you provided points me in the direction of the source of the bug being here.
Quoting the error:In context=(‘properties’, ‘opleiding’), array schema missing items
When you defineopleiding
as being of typearray
, you should follow it up withitems
. See an example below from JSON Schema’s docs:
{
"type": "array",
"items": {
"type": "number"
}
}
-
Redundant
response_format
:
When using tools in OpenAI Chat Completion, theresponse_format
is automatically set to{"type": "json_object"}
– source. Therefore, you can remove this line of code:response_format={"type": "json_object"},
. -
Provide example text:
Could you provide an example input text you’re trying to extract data from?