StructuredPrompt(
self,
messages: Sequence[MessageLikeRepresentation],
schema_: dict | type[BaseModelFormat the chat template into a string.
Async format the chat template into a string.
Format prompt.
Async format prompt.
Format kwargs into a list of messages.
Async format kwargs into a list of messages.
Human-readable representation.
Print a human-readable representation.
A list of the names of the variables whose values are required as inputs to the
A list of the names of the variables for placeholder or MessagePlaceholder that
A dictionary of the types of the variables the prompt template expects.
How to parse the output of calling an LLM on this formatted prompt.
A dictionary of the partial variables the prompt template carries.
Metadata to be used for tracing.
Tags to be used for tracing.
Return the output type of the prompt.
The name of the Runnable. Used for debugging and tracing.
Input type.
Output Type.
The type of input this Runnable accepts specified as a Pydantic model.
Output schema.
List configurable fields for this Runnable.
Get the name of the Runnable.
Get a Pydantic model that can be used to validate input to the Runnable.
Get a JSON schema that represents the input to the Runnable.
Get a Pydantic model that can be used to validate output to the Runnable.
| Name | Type | Description |
|---|---|---|
messages* | Sequence[MessageLikeRepresentation] | Sequence of messages. |
schema_ | dict | type[BaseModel] | None | Default: NoneSchema for the structured prompt. |
structured_output_kwargs | dict[str, Any] | None | Default: None |
template_format | PromptTemplateFormat | Default: 'f-string' |
| Name | Type |
|---|---|
| messages | Sequence[MessageLikeRepresentation] |
| schema_ | dict | type[BaseModel] | None |
| structured_output_kwargs | dict[str, Any] | None |
| template_format | PromptTemplateFormat |
Structured prompt template for a language model.
Async invoke the prompt.
Get a JSON schema that represents the output of the Runnable.
Additional kwargs for structured output.
Template format for the prompt.