Create a class from a string template.
from_template(
cls,
template: str,
template_format: PromptTemplateFormat = 'f-string',
partial_variables: dict[str, Any] | None = None,
**kwargs: Any = {}
) -> Self| Name | Type | Description |
|---|---|---|
template* | str | a template. |
template_format | PromptTemplateFormat | Default: 'f-string'format of the template. |
partial_variables | dict[str, Any] | None | Default: NoneA dictionary of variables that can be used to partially fill in the template. For example, if the template is |
**kwargs | Any | Default: {}Keyword arguments to pass to the constructor. |