src.llm_interpreter.config

Configuration module for LLM API integration.

Handles secure API key management and configuration settings.

Module Contents

class src.llm_interpreter.config.LLMConfig(config_dict: Dict[str, Any] | None = None)

Manages LLM API configuration and authentication.

get_api_key(provider: str) str | None

Get API key for the specified provider.

Parameters:

provider – ‘gemini’ or ‘openai’.

Returns:

API key string or None if not found.

get_provider() str

Get the configured LLM provider.

Returns:

Provider name (‘gemini’ or ‘openai’).

get_model_name(provider: str) str

Get the model name for the specified provider.

Parameters:

provider – ‘gemini’ or ‘openai’.

Returns:

Model name string.

is_enabled() bool

Check if agentic report generation is enabled.

Returns:

True if enabled, False otherwise.

get_report_config() Dict[str, Any]

Get report generation configuration.

Returns:

Dictionary with report settings.

validate_configuration() bool

Validate the current configuration.

Returns:

True if configuration is valid, False otherwise.