LuceeInquiryAIsession()

This feature is experimental and may be subject to change. If you encounter any issues while using this functionality, please report bugs and errors in our bug tracking system. Sends a question/message to an AI session and returns the response. The function maintains conversation context from previous interactions within the same session. The response can either be returned as a complete string or streamed in chunks to a listener function for real-time processing.

LuceeInquiryAIsession( session=any, question=string, listener=function );

Returns: String

Argument Description
session
any, required

The AI session object returned by LuceeCreateAISession(). This session maintains the conversation history and configuration settings like temperature and system message.

Alias: aiSession

question
string, required

The question or message to send to the AI. This can be plain text or structured data (like JSON) depending on how the session was configured in its system message. The question becomes part of the conversation history and provides context for future interactions within the same session.

Alias: message

listener
function, optional

A user-defined function that receives the response in chunks as they arrive from the AI. This enables real-time processing or display of the response. The listener function should accept a single argument which will contain the response chunk. When a listener is provided, the function still returns the complete response as a string, but also streams each chunk to the listener as it arrives.

Examples

There are currently no examples for this function 18,513ms WARN No examples for function luceeinquiryaisession

See also