# strip_think_tags

> **Function** in `langchain_perplexity`

📖 [View in docs](https://reference.langchain.com/python/langchain-perplexity/output_parsers/strip_think_tags)

Removes all <think>...</think> tags and their content from text.

This function removes all occurrences of think tags, preserving text
before and after the tags. It also handles markdown code fences.

## Signature

```python
strip_think_tags(
    text: str,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | `str` | Yes | The input text that may contain think tags. |

## Returns

`str`

The text with all `<think>...</think>` blocks removed.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/ee95ad6907f5eab94644183393a20aa2a032bb19/libs/partners/perplexity/langchain_perplexity/output_parsers.py#L9)