Reference for the ChatCopyToTag Display action — copies the current chat conversation into a tag as plain text, without invoking the LLM.
AI Integration → Local AI → ChatCopyToTag Action Reference
Purpose
ChatCopyToTag is a Display Action that . It reads the conversation transcript held for the calling client connection and writes it, as a single plain-text string, into a tag you choose. No LLM call is made.
Use it to hand the conversation to something that is not other than a chat panel — a report, an audit record, a notification, a script.
When to use
- Saving a conversation to a tag that , for a historian, dataset or script picks to pick up for audit.
- Including the conversation in a report or a notification.
- Passing the conversation to a script for further processing.
To empty the conversation, use ChatClear Action Reference. To shorten it, use ChatCompress Action Reference.
How it works
On click, the action asks the server for the transcript of the chat control on the same Display, formats it as text, and writes the result to the Destination Tag. The call completes before the action returns. It produces no reply envelope.
ChatCopyToTag is available on the Action dynamic only. It is not a CodeBehind action type.
Configuration
On a Button (or any clickable control), add an Action dynamic with:
Field | Setting |
|---|---|
Action type |
|
Destination Tag | Required. The tag that receives receiving the transcript text — a text tag reference such as |
Object (not used) | Not used. |
Return, Expressions | Not available. The editor shows neither the Return row nor the Expressions grid for this action. |
Output format
The text lists the conversation in chronological order. Each message is written as its role label, a colon and a space, then the message text. Messages are separated by one blank line:
| Code Block |
|---|
User: What is the level of Tank 1? Assistant: Tank 1 is at 72%. User: And Tank 2? Assistant: Tank 2 is at 41%. |
Label | Messages |
|---|---|
| The operator's questions. |
| The model's replies. |
| Error messages the platform writes into the conversation. |
| Warning messages the platform writes into the conversation. |
System prompts and tool-call messages are not included. The model's Markdown is kept as written inside each message. The text carries no timestamps, tool traces, latency or status — if you need those, read the reply envelope from ChatRequest instead.
Gates
ChatCopyToTag checks a single gate before reading the transcript:
SolutionCapabilities[LocalAI].Enabledmust betrue— the master Local AI switch.
When the switch is off, the action writes an empty string to the Destination Tag — even if a chat panel on screen still shows messages. Because this action has no reply envelope, the disabled state is not reported: an empty Destination Tag is the only signal.
| Info |
|---|
An empty Destination Tag after the action runs means one of three things: Local AI is disabled, the conversation has no messages yet, or reading the transcript could not be readfailed. |
Target resolution
ChatCopyToTag copies the conversation of the chat control on the same Display. The target is resolved automatically by the control's Uid, the same way as for ChatClear and ChatCompress; the . The Object field plays no part.
Chat controls on one Display share one conversation, so there is normally a single conversation to copy. See ChatSession Control Reference for the case where two chat controls carry different Uids.
See also
- ChatRequest Action Reference — the primary chat action that . It sends operator queries to the LLM and manages the transcript.
- ChatClear Action Reference — empties the transcript without invoking the LLM.
- ChatCompress Action Reference — replaces the transcript with a single summary message via one LLM call.
- ChatSession Control Reference — the Display control that renders rendering the conversation thread.
- Local AI — the parent section, includes a step-by-step quick-start.
In this section...
| Page Tree | ||
|---|---|---|
|