PromptValue#

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.

abstract to_messages() list[BaseMessage][source]#

Return prompt as a list of Messages.

Return type:

list[BaseMessage]

abstract to_string() str[source]#

Return prompt value as string.

Return type:

str