# is_chat_model

> **Function** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/chains/prompt_selector/is_chat_model)

Check if the language model is a chat model.

## Signature

```python
is_chat_model(
    llm: BaseLanguageModel,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `llm` | `BaseLanguageModel` | Yes | Language model to check. |

## Returns

`bool`

`True` if the language model is a BaseChatModel model, `False` otherwise.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/ee95ad6907f5eab94644183393a20aa2a032bb19/libs/langchain/langchain_classic/chains/prompt_selector.py#L56)