# 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[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* templates

  array\[object]

  required

  ***

  An array of templates.

  * name

    string

    required

    ***

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

  * template

    object

    required

    ***

    Template specification.

    * model

      string

      ***

      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]

      ***

      Template message specification.

      * role

        string

        required

        valid value:

        `system`, `user`, or `assistant`

        ***

        Role of the message.

      * content

        string

        required

        ***

        Content of the message (prompt).

* max\_req\_body\_size

  integer

  default: `67108864`

  valid value:

  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.
