# conditional_decorator

> **Function** in `langchain_community`

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

Conditionally apply a decorator.

## Signature

```python
conditional_decorator(
    condition: bool,
    decorator: Callable[[Any], Any],
) -> Callable[[Any], Any]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `condition` | `bool` | Yes | A boolean indicating whether to apply the decorator. |
| `decorator` | `Callable[[Any], Any]` | Yes | A decorator function. |

## Returns

`Callable[[Any], Any]`

A decorator function.

---

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