serializeAISession

Converts an AI session to a JSON string with its settings and conversation history, so it can be stored and restored later with loadAISession().

serializeAISession(session [, maxlength] [, condense]) → returns string

This function requires Lucee 7.0.0.195 and up.  Not supported on Adobe ColdFusion, etc.

Argument Reference

session any
Required

An AI session created with createAISession().

maxlength numeric

The maximum number of recent exchanges to keep. Older ones are left out.

condense boolean

When true, older parts of the conversation are summarized to save space.

Examples
Sample code invoking the serializeAISession function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub