class langchain_core.prompt_values.PromptValue[source]

Bases: Serializable, ABC

Base abstract class for inputs to any language model.

PromptValues can be converted to both LLM (pure text-generation) inputs and

ChatModel inputs.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

abstract to_messages() List[BaseMessage][source]

Return prompt as a list of Messages.

Return type


abstract to_string() str[source]

Return prompt value as string.

Return type