inquiryAISession

Sends a question to an AI session and returns the answer. Earlier questions and answers in the session are used as context. aiInquirySession() is an alias. Lucee 6.2 names it luceeInquiryAISession(), which Lucee 7 still accepts.

inquiryAISession(session, question [, listener]) → returns string

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

Argument Reference

session any
Required

An AI session created with createAISession().

question any
Required

The question to send. Pass an array to send multiple parts, such as text together with files or binary data.

listener function

A function that receives the answer in chunks as they arrive, for streaming.

Examples
Sample code invoking the inquiryAISession function

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

Fork me on GitHub