# ChatMessagePromptTemplate

> **Class** in `langchain_core`

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

Chat message prompt template.

## Signature

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

## Extends

- `BaseStringMessagePromptTemplate`

## Properties

- `role`

## Methods

- [`format()`](https://reference.langchain.com/python/langchain-core/prompts/chat/ChatMessagePromptTemplate/format)
- [`aformat()`](https://reference.langchain.com/python/langchain-core/prompts/chat/ChatMessagePromptTemplate/aformat)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/core/langchain_core/prompts/chat.py#L354)