Formatron v0.4.9
Formatron empowers everyone to control the output format of language models with minimal overhead.
Loading...
Searching...
No Matches
formatron.schemas.pydantic.ClassSchema Class Reference

A wrapper for pydantic BaseModel that implements the Schema interface. More...

Inheritance diagram for formatron.schemas.pydantic.ClassSchema:
formatron.schemas.schema.Schema

Class Methods

typing.Dict[str, typing.Any] fields (cls)
 Get the fields of the schema.
 
"ClassSchema" from_json (cls, str _json)
 Create a ClassSchema from a JSON string.
 

Additional Inherited Members

- Public Member Functions inherited from formatron.schemas.schema.Schema

Detailed Description

A wrapper for pydantic BaseModel that implements the Schema interface.

Definition at line 73 of file pydantic.py.

Member Function Documentation

◆ fields()

typing.Dict[str, typing.Any] formatron.schemas.pydantic.ClassSchema.fields ( cls)

Get the fields of the schema.

Reimplemented from formatron.schemas.schema.Schema.

Definition at line 84 of file pydantic.py.

◆ from_json()

"ClassSchema" formatron.schemas.pydantic.ClassSchema.from_json ( cls,
str _json )

Create a ClassSchema from a JSON string.

Reimplemented from formatron.schemas.schema.Schema.

Definition at line 103 of file pydantic.py.


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