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