> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Camel.terminators.response terminator

<a id="camel.terminators.response_terminator" />

<a id="camel.terminators.response_terminator.ResponseWordsTerminator" />

## ResponseWordsTerminator

```python theme={"system"}
class ResponseWordsTerminator(ResponseTerminator):
```

Terminate agent when some words reached to occurrence
limit by any message of the response.

**Parameters:**

* **words\_dict** (dict): Dictionary of words and its occurrence threshold.
* **case\_sensitive** (bool): Whether count the words as case-sensitive. (default: :obj:`False`)
* **mode** (TerminationMode): Whether terminate agent if any or all pre-set words reached the threshold. (default: :obj:`TerminationMode.ANY`)

<a id="camel.terminators.response_terminator.ResponseWordsTerminator.__init__" />

### **init**

```python theme={"system"}
def __init__(
    self,
    words_dict: Dict[str, int],
    case_sensitive: bool = False,
    mode: TerminationMode = TerminationMode.ANY
):
```

<a id="camel.terminators.response_terminator.ResponseWordsTerminator._validate" />

### \_validate

```python theme={"system"}
def _validate(self):
```

<a id="camel.terminators.response_terminator.ResponseWordsTerminator.is_terminated" />

### is\_terminated

```python theme={"system"}
def is_terminated(self, messages: List[BaseMessage]):
```

Whether terminate the agent by checking the occurrence
of specified words reached to preset thresholds.

**Parameters:**

* **messages** (list): List of :obj:`BaseMessage` from a response.

**Returns:**

tuple: A tuple containing whether the agent should be
terminated and a string of termination reason.

<a id="camel.terminators.response_terminator.ResponseWordsTerminator.reset" />

### reset

```python theme={"system"}
def reset(self):
```

Reset the terminator.
