Check if all requirements for Anthropic count_tokens() are met.
Get the number of tokens in a string of text.
Get the token ids for a string of text.
Convert a list of messages to a prompt for llama.
Convert a list of messages to a prompt for llama.
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.
Convert a list of messages to a prompt for mistral.
Convert a list of messages to a prompt for DeepSeek-R1.
Bedrock chat model integration built on the Bedrock converse API.
This implementation will eventually replace the existing ChatBedrock implementation once the Bedrock converse API has feature parity with older Bedrock API. Specifically the converse API does not yet support custom Bedrock models.
Base class for Bedrock models.
Adapter class to prepare the inputs from Langchain to prompt format that Chat model expects.
A chat model that uses the Bedrock API.