Pass Settings with ParseConfig
The parse
function in the agentic-doc library accepts a ParseConfig
object to simplify and centralize configuration. The ParseConfig
class is available in agentic-doc v0.3.0 and later.
ParseConfig
is a configuration class you can use to group optional settings for the parse
function in the agentic-doc library. Instead of passing multiple parameters individually, you can pass a single ParseConfig
object that holds multiple settings.
We recommend using ParseConfig
to configure settings for the Parse
function, instead of passing the individual parameters to the function.
Use Cases
Use ParseConfig
when you want to:
- group multiple parsing options into a single object.
- reuse the same settings across multiple
parse
calls. - control parsing behavior based on user input or environment.
Basic Usage
To use ParseConfig
, define your settings inside a ParseConfig
object and pass that object to the parse
function.
ParseConfig Parameters
The ParseConfig
class accepts several optional parameters that control the behavior of the parse
function. You can include only the settings you need.
Here is the full list of accepted parameters:
Settings Precedence
We recommend using ParseConfig
to configure settings for the Parse
function, instead of passing the individual parameters to the function. However, if you configure one setting using both methods, values passed directly to the parse
function take precedence over values passed in the ParseConfig
object.
For example, the result of the script below will include marginalia, because the direct argument takes precedence over the value passed in the ParseConfig
object.