def METHOD_NAME(
    self, message: str, chat_history: Optional[List[ChatMessage]] = None
) -> AgentChatResponse:
    if chat_history is not None:
        self._memory.set(chat_history)
    self._memory.put(ChatMessage(content=message, role="user"))
    all_messages = self._prefix_messages + self._memory.get()
    chat_response = self._llm.METHOD_NAME(all_messages)
    ai_message = chat_response.message
    self._memory.put(ai_message)
    return AgentChatResponse(response=str(chat_response.message.content))