"""接口层 - 大模型API调用接口"""
from abc import ABC, abstractmethod
from typing import Dict, Any


class LLMClient(ABC):
    """大模型API调用接口"""

    @abstractmethod
    async def chat_completion(
        self,
        messages: list[Dict[str, str]],
        **kwargs
    ) -> Dict[str, Any]:
        """
        异步调用聊天补全API

        Args:
            messages: 消息列表，格式为 [{"role": "user", "content": "..."}]
            **kwargs: 额外参数（temperature, max_tokens等）

        Returns:
            API响应结果，包含 content, usage 等字段
        """
        pass

    @abstractmethod
    def get_model_id(self) -> str:
        """获取模型ID"""
        pass

    @abstractmethod
    def get_server_url(self) -> str:
        """获取服务器URL"""
        pass
