# xor_args

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/utils/utils/xor_args)

Validate specified keyword args are mutually exclusive.

## Signature

```python
xor_args(
    *arg_groups: tuple[str, ...] = (),
) -> Callable[..., Any]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `*arg_groups` | `tuple[str, ...]` | No | Groups of mutually exclusive keyword args. (default: `()`) |

## Returns

`Callable[..., Any]`

Decorator that validates the specified keyword args are mutually exclusive.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/8215039dea978372bd3fd95b88663a11b0159043/libs/core/langchain_core/utils/utils.py#L24)