Interface ZIF_LLM_CLIENT_JSON_SCHEMA
AI Generated documentation.
Overview
The ZIF_LLM_CLIENT_JSON_SCHEMA interface defines a structured approach to creating and managing JSON schemas. It includes public methods for creating a new schema instance, adding properties, arrays, and objects, and generating the final schema. The interface supports only one level of nesting for properties, arrays, and objects.
Public Methods
new_format: Creates a new instance of the JSON schema.- Parameters:
title(TYPEstring): The title of the JSON schema.
-
Returns:
result(TYPEREF TO zif_llm_client_json_schema): A reference to the newly created JSON schema instance.
-
add_property: Adds a property to the JSON schema. Only one level of nesting is supported. - Parameters:
property(TYPEproperty_def): The property to add.
-
Exceptions:
zcx_llm_validation: Raised if the property addition fails validation.
-
add_array: Adds an array of a specific object to the JSON schema. Only one level of nesting is supported. - Parameters:
array(TYPEarray_def): The array to add.
-
Exceptions:
zcx_llm_validation: Raised if the array addition fails validation.
-
add_object: Adds an object with parameters to the JSON schema. Only one level of nesting is supported. - Parameters:
object(TYPEobject_def): The object with parameters to add.
-
Exceptions:
zcx_llm_validation: Raised if the object addition fails validation.
-
generate_schema: Generates the final JSON schema. - Returns:
result(TYPEstring): The generated JSON schema as a string.
Dependencies
None.