layout='chat'
<LLM />
component is a component for streaming processes using Open AI and Anthropic APIs.
<LLM />
components can be used for the following functions.
<LLM />
.<LLM />
component sends the following data by default to the Python function specified in postData
.
prompt
: text entered by the user.
thread_id
: thread ID of the conversation with the AI, updated to a new value, e.g. when the user presses the ‘Start new thread’ button.
is_new_conversation
: whether a new conversation has started. Updated to true
, e.g. when the user presses the ‘Start new thread’ button.
vars
property if you want to send additional data to these or override the default data.
Translated with DeepL.com (free version)
defineState()
function.create_chunk
function. The first argument is the content of the chat and the second argument is the content of the artifact. The artifact can be HTML or markdown.