langchain/prompts/chat.py/AIMessagePromptTemplate/format
class AIMessagePromptTemplate:    def format(self, **kwargs: Any) -> BaseMessage:
        text = self.prompt.format(**kwargs)
        return AIMessage(content=text, additional_kwargs=self.additional_kwargs)