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

# components.Utils

> Utility functions and helpers for Components integration.

[View module source on GitHub](https://github.com/maximhq/maxim-py/blob/main/maxim/logger/components/utils.py)

This module contains utility functions for parsing attachments from messages.

#### parse\_attachments\_from\_messages

```python theme={null}
def parse_attachments_from_messages(
    messages: list["GenerationRequestMessage"]
) -> Tuple[list["GenerationRequestMessage"], list["Attachment"]]
```

Parses the attachment from the result.

**Arguments**:

| Name       | Type                                                                                     | Description                             |
| ---------- | ---------------------------------------------------------------------------------------- | --------------------------------------- |
| `messages` | *List\[[GenerationRequestMessage](/sdk/python/references/logger/components/generation)]* | The messages to parse attachments from. |

**Returns**:

| Name    | Description                                                           |
| ------- | --------------------------------------------------------------------- |
| `tuple` | A tuple containing the modified messages and the list of attachments. |
