ChatPromptAdapter#
- class langchain_aws.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,Β ...)format_messages
(provider,Β messages)- __init__()#
- classmethod convert_messages_to_prompt(provider: str, messages: List[BaseMessage], model: str) str [source]#
- Parameters:
provider (str) β
messages (List[BaseMessage]) β
model (str) β
- 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]]