본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

AI 프롬프트 데코레이터 플러그인 구성 레퍼런스

원문 보기 위키 갱신

AI 프롬프트 데코레이터 플러그인 구성 레퍼런스 (AI Prompt Decorator Plugin Configuration Reference)

이 문서는 Kong의 AI Prompt Decorator 플러그인에서 설정할 수 있는 모든 구성 옵션을 정리한 레퍼런스 문서예요. llm_format으로 anthropic, bedrock, cohere, gemini, huggingface, openai 같은 LLM 입출력 형식을 지정하는 방법과 검사 가능한 최대 요청 본문 크기를 조절하는 max_request_body_size 설정을 확인할 수 있어요. 또한 prompts의 prepend와 append 옵션을 사용해 채팅 메시지 배열 앞이나 뒤에 role과 content를 지정한 메시지를 삽입하는 방법도 설명해요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "llm_format": {
          "default": "openai",
          "description": "LLM input and output format and schema to use",
          "enum": [
            "anthropic",
            "bedrock",
            "cohere",
            "gemini",
            "huggingface",
            "openai"
          ],
          "type": "string"
        },
        "max_request_body_size": {
          "default": 1048576,
          "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.",
          "type": "integer"
        },
        "prompts": {
          "properties": {
            "append": {
              "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.",
              "items": {
                "properties": {
                  "content": {
                    "maxLength": 100000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "role": {
                    "default": "system",
                    "enum": [
                      "assistant",
                      "system",
                      "user"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "content"
                ],
                "type": "object"
              },
              "maxLength": 15,
              "type": "array"
            },
            "prepend": {
              "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.",
              "items": {
                "properties": {
                  "content": {
                    "maxLength": 100000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "role": {
                    "default": "system",
                    "enum": [
                      "assistant",
                      "system",
                      "user"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "content"
                ],
                "type": "object"
              },
              "maxLength": 15,
              "type": "array"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "consumer": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "consumer_group": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https"
      ],
      "description": "A set of strings representing HTTP protocols.",
      "items": {
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "route": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "service": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}

관련 리소스

더 알아보기 (Learn more)