ChatPromptValue#

class langchain_core.prompt_values.ChatPromptValue[source]#

Bases: PromptValue

Chat prompt value.

A type of a prompt value that is built from messages.

param messages: Sequence[BaseMessage] [Required]#

List of messages.

to_messages() list[BaseMessage][source]#

Return prompt as a list of messages.

Return type:

list[BaseMessage]

to_string() str[source]#

Return prompt as string.

Return type:

str