# Cohere

> **Class** in `langchain_cohere`

📖 [View in docs](https://reference.langchain.com/python/langchain-cohere/llms/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:**

```python
from langchain_cohere import Cohere

cohere = Cohere(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`

---

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