yannsay's picture
Deploy clean to build-small-hackathon org (32B Qwen, step-3 table)
aa1d0aa verified
Raw
History Blame Contribute Delete
436 Bytes
from __future__ import annotations
from abc import ABC, abstractmethod
from pydantic import BaseModel
class ChatModel(ABC):
@abstractmethod
def structured(self, messages: list[dict], schema: type[BaseModel]) -> BaseModel:
"""Call the model and return a validated Pydantic instance."""
@abstractmethod
def complete(self, messages: list[dict]) -> str:
"""Call the model and return raw text content."""