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

LLM 라우트 채팅 타입 오류 해결

원문 보기 위키 갱신

LLM 라우트 채팅 타입 오류 해결 (Resolving the LLM route chat type error)

Kong Gateway에서 LLM 라우트로 요청을 보낼 때 "LLM route only supports llm chat type requests" 오류가 발생하는 원인과 해결 방법을 설명하는 문서예요. 오류는 잘못된 Content-Type 헤더를 보낼 때 생기는데, curl 같은 도구는 기본적으로 application/x-www-form-urlencoded를 사용해요. 요청에 Content-Type: application/json 헤더를 추가하면 Kong Gateway가 페이로드 형식을 올바르게 해석해서 오류를 바로 해결할 수 있어요

출처: 문서

본문

핵심 요약

"LLM route only supports llm chat type requests" 오류는 어떻게 해결해요? Kong Gateway가 페이로드 형식을 올바르게 해석할 수 있도록 필수 헤더인 Content-Type: application/json을 추가하세요.

이 오류는 Kong Gateway에 잘못된 content-type 헤더를 보낼 때 발생해요. curl 같은 일부 유틸리티는 기본적으로 Content-Type: application/x-www-form-urlencoded를 사용해요. 이 문제를 해결하려면 헤더를 Content-Type: application/json으로 보내고 있는지 확인하세요.

curl -X POST https://mygateway/api/v1 \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "Why is the sky blue?"
      }
    ]
  }'

더 알아보기 (Learn more)

이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.