Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ return result;
| Action | Purpose | Example |
|--------|---------|---------|
| `set_global_data` | Store data for later use | `{"key": "value"}` |
| `transfer` | End AI, prepare for transfer | `True` |
| `transfer` | End AI, prepare for transfer. **Required** as `True` to perform a hard transfer. | `True` |
| `swml` | Execute SWML after AI ends | `{"version": "1.0.0", ...}` |
| `stop` | End the AI conversation | `True` |
| `toggle_functions` | Enable/disable functions | `[{"active": false, "function": "fn_name"}]` |
Expand Down Expand Up @@ -605,9 +605,9 @@ Or for a transfer:
{
"response": "Transferring you to a specialist now.",
"action": [
{"transfer": true},
{
"swml": {
"transfer": true,
"SWML": {
"version": "1.0.0",
"sections": {
"main": [
Expand Down
5 changes: 4 additions & 1 deletion fern/snippets/swml/_actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@
</ParamField>
</Indent>

<ParamField path="action[].transfer" type="object" toc={true}>
<ParamField path="action[].transfer" type="boolean" toc={true}>
Transfer the call to a new destination.

When `true`, ends the AI session and hard-transfers the call to the sibling `action[].SWML` payload in the same action object.
When omitted or `false`, the SWML executes inline and the AI session continues afterward.
</ParamField>

<Indent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ model SWMLAction {
@summary("SWML")
@doc("A SWML object to be executed.")
SWML: SWMLObject;

@summary("transfer")
@doc("When `true`, ends the AI session and hard-transfers the call to the sibling `SWML` payload. When omitted or `false`, the SWML executes inline and the AI session continues afterward.")
@example(true)
transfer?: boolean | SWMLVar;
}
Loading