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

Public Member Functions

 __init__ (self, typing.Type annotation)
 Initialize the field information.
 
- Public Member Functions inherited from formatron.schemas.schema.FieldInfo

Protected Attributes

 _annotation
 

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 14 of file dict_inference.py.

Constructor & Destructor Documentation

◆ __init__()

formatron.schemas.dict_inference.FieldInfo.__init__ ( self,
typing.Type annotation )

Initialize the field information.

Parameters
annotationThe type annotation of the field.

Definition at line 23 of file dict_inference.py.

Member Function Documentation

◆ annotation()

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

Get the type annotation of the field.

Reimplemented from formatron.schemas.schema.FieldInfo.

Definition at line 37 of file dict_inference.py.

◆ required()

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

Check if the field is required for the schema.

Reimplemented from formatron.schemas.schema.FieldInfo.

Definition at line 53 of file dict_inference.py.

Member Data Documentation

◆ _annotation

formatron.schemas.dict_inference.FieldInfo._annotation
protected

Definition at line 24 of file dict_inference.py.


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