# ChatGPTLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/chatgpt/ChatGPTLoader)

Load conversations from exported `ChatGPT` data.

## Signature

```python
ChatGPTLoader(
    self,
    log_file: str,
    num_logs: int = -1,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `log_file` | `str` | Yes | Path to the log file |
| `num_logs` | `int` | No | Number of logs to load. If 0, load all logs. (default: `-1`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    log_file: str,
    num_logs: int = -1,
)
```

| Name | Type |
|------|------|
| `log_file` | `str` |
| `num_logs` | `int` |


## Properties

- `log_file`
- `num_logs`

## Methods

- [`load()`](https://reference.langchain.com/python/langchain-community/document_loaders/chatgpt/ChatGPTLoader/load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/document_loaders/chatgpt.py#L31)