dllmforge.IE_agent_config

Configuration module for Information Extraction Agent. Defines configuration classes and utilities for managing user inputs.

Classes

DocumentConfig(*, input_dir[, file_pattern, ...])

Configuration for document processing

ExtractorConfig(*[, chunk_size, chunk_overlap])

Configuration for information extraction

IEAgentConfig(*, schema, document, extractor)

Main configuration class for Information Extraction Agent

SchemaConfig(*, task_description[, ...])

Configuration for schema generation

class dllmforge.IE_agent_config.SchemaConfig(*, task_description: str, example_doc: str | None = None, user_schema_path: Path | None = None, output_path: Path | None = None)[source]

Configuration for schema generation

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

task_description: str
example_doc: str | None
user_schema_path: Path | None
output_path: Path | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class dllmforge.IE_agent_config.DocumentConfig(*, input_dir: Path, file_pattern: str = '*.pdf*', output_type: str = 'text', output_dir: Path | None = None)[source]

Configuration for document processing

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

input_dir: Path
file_pattern: str
output_type: str
output_dir: Path | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class dllmforge.IE_agent_config.ExtractorConfig(*, chunk_size: int = 80000, chunk_overlap: int = 10000)[source]

Configuration for information extraction

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

chunk_size: int
chunk_overlap: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class dllmforge.IE_agent_config.IEAgentConfig(*, schema: ~dllmforge.IE_agent_config.SchemaConfig, document: ~dllmforge.IE_agent_config.DocumentConfig, extractor: ~dllmforge.IE_agent_config.ExtractorConfig = <factory>)[source]

Main configuration class for Information Extraction Agent

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

document: DocumentConfig
extractor: ExtractorConfig
classmethod from_dict(config_dict: Dict[str, Any]) IEAgentConfig[source]

Create config from dictionary

classmethod load_from_file(config_path: str | Path) IEAgentConfig[source]

Load config from JSON or YAML file

save_to_file(config_path: str | Path) None[source]

Save config to JSON or YAML file

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].