"""Type stubs for _foundationmodels Cython extension."""

from typing import Any, Callable, Dict, List, Optional

# Initialization and cleanup
def init() -> None: ...
def cleanup() -> None: ...
def get_version() -> str: ...

# Availability functions
def check_availability() -> int: ...
def get_availability_reason() -> Optional[str]: ...
def is_ready() -> bool: ...

# Language support
def get_supported_languages_count() -> int: ...
def get_supported_language(index: int) -> Optional[str]: ...

# Session management
def create_session(config: Optional[Dict[str, Any]] = None) -> int: ...

# Text generation
def generate(prompt: str, temperature: float = 1.0, max_tokens: int = 1024) -> str: ...

# Structured generation
def generate_structured(
    prompt: str,
    schema: Dict[str, Any],
    temperature: float = 1.0,
    max_tokens: int = 1024,
) -> Dict[str, Any]: ...

# Streaming generation
def generate_stream(
    prompt: str,
    callback: Callable[[Optional[str]], None],
    temperature: float = 1.0,
    max_tokens: int = 1024,
) -> None: ...

# History management
def get_history() -> List[Any]: ...
def clear_history() -> None: ...
def add_message(role: str, content: str) -> None: ...

# Tool calling
def register_tools(tools: Dict[str, Callable]) -> None: ...
def get_transcript() -> List[Dict[str, Any]]: ...

# Statistics
def get_stats() -> Dict[str, Any]: ...
def reset_stats() -> None: ...
