langchain_community.chat_models.anthropic.convert_messages_to_prompt_anthropicΒΆ

langchain_community.chat_models.anthropic.convert_messages_to_prompt_anthropic(messages: List[BaseMessage], *, human_prompt: str = '\n\nHuman:', ai_prompt: str = '\n\nAssistant:') str[source]ΒΆ
Format a list of messages into a full prompt for the Anthropic model
Args:

messages (List[BaseMessage]): List of BaseMessage to combine. human_prompt (str, optional): Human prompt tag. Defaults to β€œ

Human:”.

ai_prompt (str, optional): AI prompt tag. Defaults to β€œ

Assistant:”.
Returns:

str: Combined string with necessary human_prompt and ai_prompt tags.