AIHas()

Checks whether a specific AI endpoint is configured and available for use.

AIHas( name=string );

Returns: Boolean

Argument Description
name
string, required

The name of the AI endpoint to check. Can be either:

  1. A direct endpoint name as configured in the Lucee Administrator
  2. A default reference (e.g., "default:exception") which will check if a default endpoint is configured for that category

Alias: aiName, nameAI

Examples

// Checks if the AI service named "test_ai" exists
AIHas("test_ai");

See also