API7 Docs

AI Prompt Template Configuration

Parameters

See plugin common configurations for configuration options available to all plugins.

  • templatesarray[object] · required

    An array of templates.

    • namestring · required

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

    • templateobject · required

      Template specification.

      • modelstring · optional

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

      • messagesarray[object] · optional

        Template message specification.

        • rolestring · required

          Valid values: system, user, or assistant

          Role of the message.

        • contentstring · required

          Content of the message (prompt).

  • max_req_body_sizeinteger · optional · default: 67108864

    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.