Core Module

The core module provides the fundamental classes and functions for AuraGen’s operation.

Core module containing global configuration and constants for the Guardian engine.

class AuraGen.core.OutputFormat(value)[source]

Bases: str, Enum

Supported output formats for generated data.

JSON = 'json'
JSONL = 'jsonl'
CSV = 'csv'
PARQUET = 'parquet'
__format__(format_spec)

Returns format using actual value type unless __str__ has been overridden.

class AuraGen.core.Language(value)[source]

Bases: str, Enum

Supported languages for data generation.

ENGLISH = 'en'
CHINESE = 'zh'
SPANISH = 'es'
FRENCH = 'fr'
GERMAN = 'de'
JAPANESE = 'ja'
__format__(format_spec)

Returns format using actual value type unless __str__ has been overridden.

class AuraGen.core.RiskSeverity(value)[source]

Bases: str, Enum

Risk severity levels.

LOW = 'low'
MEDIUM = 'medium'
HIGH = 'high'
CRITICAL = 'critical'
__format__(format_spec)

Returns format using actual value type unless __str__ has been overridden.

class AuraGen.core.GlobalConfig(ENGINE_VERSION: str = '0.1.0', ENGINE_NAME: str = 'Guardian', DEFAULT_LANGUAGE: ~AuraGen.core.Language = Language.ENGLISH, DEFAULT_OUTPUT_FORMAT: ~AuraGen.core.OutputFormat = OutputFormat.JSONL, DEFAULT_BATCH_SIZE: int = 100, DEFAULT_MAX_RETRIES: int = 3, SUPPORTED_OUTPUT_FORMATS: ~typing.List[~AuraGen.core.OutputFormat] = <factory>, SUPPORTED_LANGUAGES: ~typing.List[~AuraGen.core.Language] = <factory>, SUPPORTED_RISK_SEVERITIES: ~typing.List[~AuraGen.core.RiskSeverity] = <factory>, MIN_QUALITY_SCORE: float = 0.7, MAX_HALLUCINATION_PROBABILITY: float = 0.3, MAX_SCENARIO_DEPTH: int = 10, MAX_RISK_COMBINATIONS: int = 5)[source]

Bases: object

Global configuration constants for the Guardian engine. These are hardcoded in the source code and not read from configuration files.

ENGINE_VERSION: str = '0.1.0'
ENGINE_NAME: str = 'Guardian'
DEFAULT_LANGUAGE: Language = 'en'
DEFAULT_OUTPUT_FORMAT: OutputFormat = 'jsonl'
DEFAULT_BATCH_SIZE: int = 100
DEFAULT_MAX_RETRIES: int = 3
SUPPORTED_OUTPUT_FORMATS: List[OutputFormat]
SUPPORTED_LANGUAGES: List[Language]
SUPPORTED_RISK_SEVERITIES: List[RiskSeverity]
MIN_QUALITY_SCORE: float = 0.7
MAX_HALLUCINATION_PROBABILITY: float = 0.3
MAX_SCENARIO_DEPTH: int = 10
MAX_RISK_COMBINATIONS: int = 5
get_supported_formats() List[str][source]

Get list of supported output formats as strings.

get_supported_languages() List[str][source]

Get list of supported languages as strings.

validate_output_format(format_str: str) bool[source]

Validate if the given format is supported.

validate_language(lang_str: str) bool[source]

Validate if the given language is supported.

__init__(ENGINE_VERSION: str = '0.1.0', ENGINE_NAME: str = 'Guardian', DEFAULT_LANGUAGE: ~AuraGen.core.Language = Language.ENGLISH, DEFAULT_OUTPUT_FORMAT: ~AuraGen.core.OutputFormat = OutputFormat.JSONL, DEFAULT_BATCH_SIZE: int = 100, DEFAULT_MAX_RETRIES: int = 3, SUPPORTED_OUTPUT_FORMATS: ~typing.List[~AuraGen.core.OutputFormat] = <factory>, SUPPORTED_LANGUAGES: ~typing.List[~AuraGen.core.Language] = <factory>, SUPPORTED_RISK_SEVERITIES: ~typing.List[~AuraGen.core.RiskSeverity] = <factory>, MIN_QUALITY_SCORE: float = 0.7, MAX_HALLUCINATION_PROBABILITY: float = 0.3, MAX_SCENARIO_DEPTH: int = 10, MAX_RISK_COMBINATIONS: int = 5) None

Core Classes

Main Functions

Utilities

Examples

Basic Usage

from AuraGen.core import AuraGenCore

# Initialize the core engine
core = AuraGenCore(config_path="config/generation.yaml")

# Generate trajectories for a specific scenario
trajectories = core.generate_trajectories(
    scenario_name="email_assistant",
    num_records=10
)

print(f"Generated {len(trajectories)} trajectories")

Advanced Configuration

from AuraGen.core import AuraGenCore
from AuraGen.models import GenerationSettings

# Custom settings
settings = GenerationSettings(
    batch_size=5,
    temperature=0.8,
    max_tokens=1500
)

core = AuraGenCore(settings=settings)

# Generate with custom constraints
constraints = {
    "industry": "healthcare",
    "urgency_level": "high"
}

trajectories = core.generate_trajectories(
    scenario_name="medical_assistant",
    constraints=constraints,
    num_records=20
)