from untrusted sources.
Parameters
template – The template to load.
template_format – The format of the template. Use jinja2 for jinja2,
and f-string or None for f-strings.
partial_variables – 
A dictionary of variables that can be used to partiallyfill in the template. For example, if the template is
”{variable1} {variable2}”, and partial_variables is
{“variable1”: “foo”}, then the final prompt will be
“foo {variable2}”.
Returns
The prompt template loaded from the template.
get_input_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶
Get a pydantic model that can be used to validate input to the runnable.
Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic input schema that depends on which
configuration the runnable is invoked with.
This method allows to get an input schema for a specific configuration.
Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate input.
classmethod get_lc_namespace() → List[str][source]¶
Get the namespace of the langchain object.
get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶
Get a pydantic model that can be used to validate output to the runnable.
Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic output schema that depends on which
configuration the runnable is invoked with.
This method allows to get an output schema for a specific configuration.
Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate output.
invoke(input: Dict, config: Optional[RunnableConfig] = None) → PromptValue¶