
<Chat /> component is used to create custom AI chats using APIs from Open AI and Anthropic.
<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 totruewhen the user presses the “Start new thread” button.
variables property.
Properties
string
required
The name of the Python function or SQL file
{ [key: string]: any }
Variables to pass to the Python function or SQL file. Declare them using the
defineState() function.number
The height of the component in pixels.