Whatever message this page gives is out now! Go check it out!

Send your first prompt

Last update:
May 18, 2026
Once ChatModel() is configured, call .chat() with a plain string. The string is treated as the user message.
Note:
ChatModel.chat() accepts a plain string only. It does not support structured chat request objects (system + user messages). For that, use Agent(), see Build with AI.
Example

    <cfscript>
      // configure chat model
      chatModelConfig = {
          provider : "openAI",
          modelName : "gpt-5-nano",
          apiKey : "#application.apiKey#"
      }
      // instantiate chat model
      chatModel= ChatModel(chatModelConfig)
  
      // chat with model
      response = chatModel.chat("Explain quantum computing in one sentence.")
      writeOutput(response.message)
    </cfscript>
  
The response struct includes message and metadata from the provider. The output displays only the message.
Output
Quantum computing uses quantum bits (qubits) that can exist in superpositions and become entangled, so computations are carried out via quantum interference to solve certain problems much faster than classical computers.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page