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

AI 프롬프트 템플릿 정책 구성 레퍼런스

원문 보기 위키 갱신

AI 프롬프트 템플릿 정책 구성 레퍼런스 (AI Prompt Template Policy Configuration Reference)

이 문서는 Kong AI Gateway의 AI Prompt Template 정책에서 설정할 수 있는 구성 옵션을 JSON 스키마 형태로 정리한 참고 자료예요. 템플릿 이름과 mustache 스타일 플레이스홀더가 들어간 템플릿 문자열을 정의하는 방법을 보여주고, 템플릿에 맞지 않는 요청 허용 여부나 원본 요청 로깅 같은 설정도 함께 다뤄요 각 필드의 데이터 타입과 기본값이 표시되어 있어서 정책을 실제로 구성하기 전에 필요한 값을 빠르게 확인할 수 있어요

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "templates": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Unique name for the template, can be called with `{template://NAME}`"
              },
              "template": {
                "type": "string",
                "description": "Template string for this request, supports mustache-style `{{placeholders}}`"
              }
            },
            "required": [
              "name",
              "template"
            ]
          },
          "description": "Array of templates available to the request context."
        },
        "allow_untemplated_requests": {
          "type": "boolean",
          "description": "Set true to allow requests that don't call or match any template.",
          "default": true
        },
        "log_original_request": {
          "type": "boolean",
          "description": "Set true to add the original request to the Kong log policy(s) output.",
          "default": false
        },
        "max_request_body_size": {
          "type": "integer",
          "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.",
          "default": 8388608
        }
      },
      "required": [
        "templates"
      ]
    }
  }
}

관련 리소스

더 알아보기 (Learn more)

  • 프롬프트를 압축해 토큰 사용량을 줄이는 정책의 구성 내용을 참고할 수 있어요 — AI Prompt Compressor Policy
  • 프롬프트에 정보를 추가하거나 수정하는 정책의 구성 내용을 살펴볼 수 있어요 — AI Prompt Decorator Policy
  • 프롬프트 내용을 검사하고 문제가 있는 요청을 차단하는 정책의 구성 내용을 확인할 수 있어요 — AI Prompt Guard Policy