Docs

AI Prompt Template Configuration

Configuration reference for the AI Prompt Template plugin (`ai-prompt-template`): the parameters, each attribute with its type, whether it is required, its default and its accepted values.

Parameters

See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.

templates — array[object] · required · since APISIX 3.11.0 · API7 Gateway 3.2.16.0

An array of templates.

name — string · required · since APISIX 3.11.0 · API7 Gateway 3.2.16.0

Name of the template. When requesting the route, the request should include the template name that corresponds to the configured template.

template — object · required · since APISIX 3.11.0 · API7 Gateway 3.2.16.0

Template specification.

model — string · optional · since APISIX 3.11.0 · API7 Gateway 3.2.16.0

Name of the LLM model, such as gpt-4 or gpt-3.5. See your LLM provider API documentation for more available models.

messages — array[object] · optional · since APISIX 3.11.0 · API7 Gateway 3.2.16.0

Template message specification.

role — string · required · since APISIX 3.11.0 · API7 Gateway 3.2.16.0

Valid values: system, user, or assistant

Role of the message.

content — string · required · since APISIX 3.11.0 · API7 Gateway 3.2.16.0

Content of the message (prompt).

max_req_body_size — integer · optional · default: 67108864 · since APISIX 3.18.0 · API7 Gateway 3.9.17

Valid values: greater than or equal to 1

Maximum request body size in bytes buffered into memory. Larger request bodies are rejected with HTTP 400 before template processing. Introduced in API7 Enterprise 3.9.17 and 3.10.4, and APISIX 3.18.0.