hokusai/hokusai/providers/__init__.py
Konstantin Fickel 4def49350e
All checks were successful
Continuous Integration / Build Package (push) Successful in 35s
Continuous Integration / Lint, Check & Test (push) Successful in 57s
chore: rename bulkgen to hokusai
2026-02-20 17:08:12 +01:00

40 lines
1.1 KiB
Python

"""Provider abstraction for AI generation backends."""
from __future__ import annotations
import abc
from pathlib import Path
from typing import TYPE_CHECKING
from hokusai.providers.models import ModelInfo
if TYPE_CHECKING:
from hokusai.config import TargetConfig
class Provider(abc.ABC):
"""Abstract base for generation providers."""
@staticmethod
@abc.abstractmethod
def get_provided_models() -> list[ModelInfo]:
"""Return the models this provider supports."""
@abc.abstractmethod
async def generate(
self,
target_name: str,
target_config: TargetConfig,
resolved_prompt: str,
resolved_model: ModelInfo,
project_dir: Path,
) -> None:
"""Generate the target artifact and write it to *project_dir / target_name*.
Args:
target_name: Output filename (relative to project_dir).
target_config: The parsed target configuration.
resolved_prompt: The fully resolved prompt text.
resolved_model: The resolved model information.
project_dir: The project working directory.
"""