"""自定义消息类型 — 替代 langchain_core.messages"""

from dataclasses import dataclass, field
from typing import Any


@dataclass
class BaseMessage:
    content: str = ""
    id: str = ""

@dataclass
class HumanMessage(BaseMessage):
    type: str = "human"

@dataclass
class AIMessage(BaseMessage):
    type: str = "ai"
    tool_calls: list[dict] = field(default_factory=list)

@dataclass
class ToolMessage(BaseMessage):
    type: str = "tool"
    name: str = ""
    tool_call_id: str = ""

@dataclass
class SystemMessage(BaseMessage):
    type: str = "system"