Source code for council.contexts._chat_history
from ._message_list import MessageList
[docs]
class ChatHistory(MessageList):
"""
represents a history of interaction, typically between and user and an agent.
"""
[docs]
@staticmethod
def from_user_message(message: str) -> "ChatHistory":
"""
helpers function that returns a new instance containing one user message
"""
history = ChatHistory()
history.add_user_message(message=message)
return history