Partager via


PromptTemplateBase Class

Base class for prompt templates.

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

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Constructor

PromptTemplateBase(*, prompt_template_config: PromptTemplateConfig, allow_dangerously_set_content: bool = False)

Keyword-Only Parameters

Name Description
prompt_template_config
Required
allow_dangerously_set_content
Required

Methods

render

Render the prompt template.

render

Render the prompt template.

abstract async render(kernel: Kernel, arguments: KernelArguments | None = None) -> str

Parameters

Name Description
kernel
Required
arguments
Default value: None

Attributes

allow_dangerously_set_content

allow_dangerously_set_content: bool

prompt_template_config

prompt_template_config: PromptTemplateConfig