# Cohere

> **Class** in `langchain_cohere`

📖 [View in docs](https://reference.langchain.com/python/langchain-cohere/llms/Cohere)

Cohere large language models.

.. deprecated:: 0.6.0
    Use :class:`~langchain_cohere.ChatCohere` instead.

To use, you should have the `cohere` python package installed, and the
environment variable `COHERE_API_KEY` set with your API key, or pass
it as a named parameter to the constructor.

## Signature

```python
Cohere()
```

## Extends

- `LLM`
- `BaseCohere`

## Properties

- `max_tokens`
- `k`
- `p`
- `frequency_penalty`
- `presence_penalty`
- `truncate`
- `max_retries`
- `model_config`
- `lc_secrets`

## ⚠️ Deprecated

Deprecated since version 0.6.0. Use langchain_cohere.ChatCohere instead. The Cohere Generate endpoint is deprecated. Use ChatCohere (the Chat endpoint) instead. Will be removed in version 1.0.0.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-cohere/blob/0e86adc8d140bf6e3da49836173bd5a50a194b63/libs/cohere/langchain_cohere/llms.py#L129)