gemseo.core.grammars.pydantic_grammar module#
A grammar based on a Pydantic model.
- class PydanticGrammar(name, model=None, **kwargs)[source]#
Bases:
BaseGrammarA grammar based on a Pydantic model.
The Pydantic model passed to the grammar is used to initialize the grammar defaults. Currently, changing the defaults will not update the model.
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
name (str) -- The name of the grammar.
model (ModelType | None) -- A Pydantic model. If
None, the model will be empty.**kwargs (Any) -- These arguments are not used.
- Raises:
ValueError -- If the name is empty.
- DATA_CONVERTER_CLASS#
alias of
DataConverter