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

# <Chat />

<Frame>
  <img src="https://mintcdn.com/queue-4c50ebb3/_HQi-05AKdEsS8di/assets/images/pages/llm-component.jpg?fit=max&auto=format&n=_HQi-05AKdEsS8di&q=85&s=7d8824a0724d7b24e0dfb5f29dffdd61" width="1280" height="720" data-path="assets/images/pages/llm-component.jpg" />
</Frame>

The `<Chat />` component is used to create custom AI chats using APIs from Open AI and Anthropic.

```tsx theme={"dark"}
<Chat
  postData="ai-chat"
  height={300}
/>
```

## `<Chat />` Data Specification

The `<Chat />` component sends the following data by default to the Python function specified in `postData`:

* `prompt`: The text input by the user

* `thread_id`: The thread ID of the conversation with the AI. This is updated to a new value when the user presses the "Start new thread" button.

* `is_new_conversation`: Whether a new conversation has started. This is updated to `true` when the user presses the "Start new thread" button.

If you want to send additional data or overwrite the default data, use the `variables` property.

## Properties

<ParamField path="postData" type="string" required>
  The name of the Python function or SQL file
</ParamField>

<ParamField path="variables" type="{ [key: string]: any }">
  Variables to pass to the Python function or SQL file. Declare them using the `defineState()` function.
</ParamField>

<ParamField path="height" type="number">
  The height of the component in pixels.
</ParamField>
