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

# File Part • AI Agent SDK

> file_part: Build a generic file content part from raw bytes/base64 or a URL.

# file\_part

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**base**](../modules/base) module.

Build a generic file content part from raw bytes/base64 or a URL.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def file_part(data: Any) -> Dict[str, Any]
```

## Parameters

<ParamField query="data" type="Any" required={false}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Dict[str, Any]">
  The result of the operation.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/tools/base.py#L166">
  `praisonaiagents/tools/base.py` at line 166
</Card>
