Formatron v0.4.9
Formatron empowers everyone to control the output format of language models with minimal overhead.
Loading...
Searching...
No Matches
config.py
Go to the documentation of this file.
1"""
2Configuration classes for Formatron.
3"""
4from dataclasses import dataclass
5
6
7@dataclass
9 """
10 Configuration for how an KBNF engine should be used in text generation.
11
12 Attributes:
13 read_prompt: Whether to accept the prompt tokens when a generation begins.
14 reset_at_beginning: Whether to reset the engine when a new generation begins.
15 """
16 read_prompt: bool = False
17 reset_at_beginning: bool = True
Configuration for how an KBNF engine should be used in text generation.
Definition config.py:14