ChatPromptAdapter#
- class langchain_community.chat_models.bedrock.ChatPromptAdapter[source]#
Adapter class to prepare the inputs from Langchain to prompt format that Chat model expects.
Methods
__init__
()convert_messages_to_prompt
(provider, messages)format_messages
(provider, messages)- __init__()#
- classmethod convert_messages_to_prompt(provider: str, messages: List[BaseMessage]) str [source]#
- Parameters:
provider (str)
messages (List[BaseMessage])
- Return type:
str
- classmethod format_messages(provider: str, messages: List[BaseMessage]) Tuple[str | None, List[Dict]] [source]#
- Parameters:
provider (str)
messages (List[BaseMessage])
- Return type:
Tuple[str | None, List[Dict]]