mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
* feat(deployed-chat): updated chat panel UI, deployed chat and API can now accept files * added nested tag dropdown for files * added duplicate file validation to chat panel * update docs & SDKs * fixed build * rm extraneous comments * ack PR comments, cut multiple DB roundtrips for permissions & api key checks in api/workflows * allow read-only users to access deployment info, but not take actions * add downloadable file to logs for files passed in via API * protect files/serve route that is only used client-side --------- Co-authored-by: waleed <waleed>
55 lines
1.8 KiB
Plaintext
55 lines
1.8 KiB
Plaintext
---
|
|
title: Chat Trigger
|
|
description: Start a workflow from a chat deployment
|
|
---
|
|
|
|
import { Callout } from 'fumadocs-ui/components/callout'
|
|
import { Image } from '@/components/ui/image'
|
|
|
|
## Overview
|
|
|
|
The Chat trigger creates a conversational interface for your workflow. Deploy your workflow as a chat and users can interact with it through a shareable URL. Each message starts a new workflow execution using your latest deployment.
|
|
|
|
## Runtime Outputs
|
|
|
|
<div className='flex justify-center my-6'>
|
|
<Image
|
|
src='/static/triggers/chat-trigger-light.png'
|
|
alt='Chat deployment conversation'
|
|
width={400}
|
|
height={250}
|
|
className='rounded-xl border border-border shadow-sm'
|
|
/>
|
|
</div>
|
|
|
|
The trigger writes three fields that downstream blocks can reference:
|
|
|
|
| Reference | Description | Type |
|
|
|-----------|-------------|------|
|
|
| `<chat.input>` | Latest user message | string |
|
|
| `<chat.conversationId>` | Conversation thread ID | string |
|
|
| `<chat.files>` | Optional uploaded files | files array |
|
|
|
|
### File Properties
|
|
|
|
Access individual file properties using array indexing:
|
|
|
|
| Property | Description | Type |
|
|
|----------|-------------|------|
|
|
| `<chat.files[0].url>` | Signed download URL | string |
|
|
| `<chat.files[0].name>` | Original filename | string |
|
|
| `<chat.files[0].size>` | File size in bytes | number |
|
|
| `<chat.files[0].type>` | MIME type | string |
|
|
| `<chat.files[0].uploadedAt>` | Upload timestamp (ISO 8601) | string |
|
|
| `<chat.files[0].expiresAt>` | URL expiry timestamp (ISO 8601) | string |
|
|
|
|
## Usage Notes
|
|
|
|
1. Add one Chat Trigger block per workflow.
|
|
2. Deploy the workflow in chat mode.
|
|
3. Share the deployment link—every reply reuses the conversation ID so the workflow can keep context.
|
|
|
|
<Callout type="info">
|
|
The builder blocks multiple Chat Trigger blocks in the same workflow.
|
|
</Callout>
|