convert_messages_to_prompt_anthropic#
- langchain_aws.chat_models.bedrock.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.
- Parameters:
messages (List[BaseMessage]) –
human_prompt (str) –
ai_prompt (str) –
- Return type:
str