# enforce_stop_tokens

> **Function** in `langchain_cohere`

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

Cut off the text as soon as any stop words occur.

## Signature

```python
enforce_stop_tokens(
    text: str,
    stop: List[str],
) -> str
```

---

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