def METHOD_NAME(self, messages: List[Dict[str, str]]) -> str:
    history = self._process_history(messages)
    return (
        self.pipe(history)[0]["generated_text"]
        .split(":")[-1]
        .replace(str(history), "")
    )