# BasePromptTemplate

> **Class** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate)

Base class for all prompt templates, returning a prompt.

## Signature

```python
BasePromptTemplate(
    self,
    *args: Any = (),
    **kwargs: Any = {},
)
```

## Extends

- `RunnableSerializable[dict, PromptValue]`
- `ABC`
- `Generic[FormatOutputType]`

## Properties

- `input_variables`
- `optional_variables`
- `input_types`
- `output_parser`
- `partial_variables`
- `metadata`
- `tags`
- `model_config`
- `OutputType`

## Methods

- [`validate_variable_names()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/validate_variable_names)
- [`get_lc_namespace()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/get_lc_namespace)
- [`is_lc_serializable()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/is_lc_serializable)
- [`get_input_schema()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/get_input_schema)
- [`invoke()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/invoke)
- [`ainvoke()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/ainvoke)
- [`format_prompt()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/format_prompt)
- [`aformat_prompt()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/aformat_prompt)
- [`partial()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/partial)
- [`format()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/format)
- [`aformat()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/aformat)
- [`dict()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/dict)
- [`save()`](https://reference.langchain.com/python/langchain-core/prompts/base/BasePromptTemplate/save)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/02991cb4cf2063d51a07268edafb05fe53de1826/libs/core/langchain_core/prompts/base.py#L40)