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

convert_messages_to_prompt(provider,Β ...)

format_messages(provider,Β messages)

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:
Return type:

Tuple[str | None, List[Dict]]