AI Prompt Template Configuration
The ai-prompt-template plugin supports pre-configured templates for user inputs to LLMs in a "fill in the blank" fashion, streamlining API management. Configuration covers plugin parameters.
Parameters
See plugin common configurations for configuration options available to all plugins.
templates
An array of templates.
name
Name of the template. When requesting the route, the request should include the template name that corresponds to the configured template.
template
Template specification.
model
Name of the LLM model, such as
gpt-4orgpt-3.5. See your LLM provider API documentation for more available models.messages
Template message specification.
role
valid value:
system,user, orassistantRole of the message.
content
Content of the message (prompt).
max_req_body_size
valid value:
greater than or equal to 1Maximum 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.