# Cohere

> **Class** in `langchain_community`

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

Cohere large language models.

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()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.llms import Cohere

cohere = Cohere(model="gptd-instruct-tft", cohere_api_key="my-api-key")

## Extends

- `LLM`
- `BaseCohere`

## Properties

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

## ⚠️ Deprecated

Deprecated since version 0.1.14.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/llms/cohere.py#L124)