src.llm_interpreter.inputs.config_parser

Configuration parser for business context extraction.

This module extracts business-relevant information from the AMMM config YAML, including objectives, channels, budgets, and constraints.

Last Modified: 2025-04-10

Module Contents

class src.llm_interpreter.inputs.config_parser.ChannelConfig

Business configuration for a media channel.

class src.llm_interpreter.inputs.config_parser.BusinessContext

Business context extracted from config file.

Contains business-relevant information for executive reporting.

property channel_names: list[str]

Get list of all channel names.

class src.llm_interpreter.inputs.config_parser.ConfigParser(config_path: pathlib.Path)

Parses AMMM YAML configuration for business context.

Extracts business-relevant information for executive reporting.

extract_business_context() BusinessContext

Extract business context from config.

Returns:

BusinessContext with all business-relevant information

src.llm_interpreter.inputs.config_parser.parse_config(config_path: pathlib.Path) BusinessContext

Parse config file and extract business context.

Parameters:

config_path – Path to YAML config file

Returns:

BusinessContext with extracted information

Example

>>> from pathlib import Path
>>> context = parse_config(Path("demo/demo_config.yml"))
>>> print(f"Project: {context.project_name}")
>>> print(f"Channels: {len(context.channels)}")