from typing import override

from template_project.adapters.ml_api_gateway import MlApiGateway
from template_project.application.resume.vector_generator import ResumeEmbeddingVectorGenerator


class DefaultResumeEmbeddingVectorGenerator(ResumeEmbeddingVectorGenerator):
    def __init__(self, ml_api_gateway: MlApiGateway) -> None:
        self._ml_api_gateway = ml_api_gateway

    @override
    async def generate(
        self,
        text: str,
    ) -> list[float]:
        return await self._ml_api_gateway.generate_embedding(text)
