Formatron v0.4.2
Formatron empowers everyone to control the output format of language models with minimal overhead.
Loading...
Searching...
No Matches
formatron.schemas.schema.FieldInfo Class Reference
Inheritance diagram for formatron.schemas.schema.FieldInfo:
formatron.schemas.dict_inference.FieldInfo formatron.schemas.json_schema.FieldInfo

Properties

typing.Type[typing.Any]|None annotation (self)
 Get the type annotation of the field.
 
bool required (self)
 Check if the field is required for the schema.
 

Detailed Description

Definition at line 9 of file schema.py.

Member Function Documentation

◆ annotation()

typing.Type[typing.Any] | None formatron.schemas.schema.FieldInfo.annotation ( self)

Get the type annotation of the field.

Reimplemented in formatron.schemas.dict_inference.FieldInfo, and formatron.schemas.json_schema.FieldInfo.

Definition at line 22 of file schema.py.

◆ required()

bool formatron.schemas.schema.FieldInfo.required ( self)

Check if the field is required for the schema.

Reimplemented in formatron.schemas.dict_inference.FieldInfo, and formatron.schemas.json_schema.FieldInfo.

Definition at line 39 of file schema.py.


The documentation for this class was generated from the following file: