SorboBot / sorbobotapp /message.py
leo-bourrel's picture
!feat: Import new sorbobot version
68a9b68
raw
history blame contribute delete
401 Bytes
from dataclasses import dataclass
from typing import List, Literal, Optional
from langchain.schema import Document
@dataclass
class Message:
"""Class for keeping track of a chat message."""
origin: Literal["human", "ai"]
message: str
documents: Optional[List[Document]] = None
def __repr__(self) -> str:
return f"Message(origin={self.origin}, message={self.message})"