Is it possible to replace enum with oneOf in the structured outputs json schema?
For example so it would look like this:
level_1_schema = {
"name": "level_1_category_identification",
"schema": {
"type": "object",
"properties": {
"entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"level_1_category": {
"type": "string",
"description": "The category into which the effect of the detail in question falls",
"oneOf": [
{
"const": "type1",
"description": "Description of type1."
},
{
"const": "type2",
"description": "Description of type2"
},
{
"const": "type3",
"description": "Description of type3"
}
]
}
},
"required": [
"level_1_category"
],
"additionalProperties": False
}
}
},
"required": [
"entities"
],
"additionalProperties": False,
"strict": True
}
}