dataclass_parser#
DataClassParser will help users convert a dataclass to prompt
Classes
|
This is similar to Dspy's signature but more controllable and flexible. |
- class DataClassParser(data_class: DataClass, return_data_class: bool = False, format_type: Literal['yaml', 'json'] = 'json')[source]#
Bases:
Component
This is similar to Dspy’s signature but more controllable and flexible.
- get_input_format_str() str [source]#
Return the formatted instructions to use in prompt for the input format.
- get_output_format_str() str [source]#
Return the formatted instructions to use in prompt for the output format.