From 14c88c32aa225d9c63e7d50ec535d9b250882799 Mon Sep 17 00:00:00 2001 From: toki Date: Fri, 10 Jul 2026 07:51:10 +0900 Subject: [PATCH] =?UTF-8?q?docs(docs):=20dev-corp=20OpenAI-compatible=20?= =?UTF-8?q?=ED=98=B8=EC=B6=9C=20=EC=8B=9C=20=EB=B0=98=EB=B3=B5=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=20loop=20=EB=B0=A9=EC=A7=80=EB=A5=BC=20=EC=9C=84?= =?UTF-8?q?=ED=95=9C=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EA=B0=80?= =?UTF-8?q?=EC=9D=B4=EB=93=9C=EB=A5=BC=20=EC=B6=94=EA=B0=80=ED=95=9C?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/dev-corp-openai-compatible-call-guide.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/dev-corp-openai-compatible-call-guide.md b/docs/dev-corp-openai-compatible-call-guide.md index 3f3b2af..1d57d5f 100644 --- a/docs/dev-corp-openai-compatible-call-guide.md +++ b/docs/dev-corp-openai-compatible-call-guide.md @@ -61,6 +61,7 @@ export default function (pi: ExtensionAPI) { ## 권장 요청 기본 권장 호출은 `stream:true`다. `think`, `reasoning_effort`, `thinking_token_budget`은 보내지 않는다. +반복 출력 loop를 피하려면 최소 sampling parameter로 `temperature: 0.2`, `top_p: 0.95`를 함께 보낸다. ```bash curl -N http://digitalplatform-iop.cloud:18086/v1/chat/completions \ @@ -74,6 +75,8 @@ curl -N http://digitalplatform-iop.cloud:18086/v1/chat/completions \ "content": "간단히 응답해줘." } ], + "temperature": 0.2, + "top_p": 0.95, "stream": true }' ``` @@ -84,7 +87,7 @@ Streaming을 처리하지 않는 client에서는 선택적으로 `stream:false` curl -fsS http://digitalplatform-iop.cloud:18086/v1/chat/completions \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ - -d '{"model":"gemma4:26b","messages":[{"role":"user","content":"ok만 응답해줘."}],"stream":false}' + -d '{"model":"gemma4:26b","messages":[{"role":"user","content":"ok만 응답해줘."}],"temperature":0.2,"top_p":0.95,"stream":false}' ``` ## 파라미터 @@ -100,6 +103,12 @@ curl -fsS http://digitalplatform-iop.cloud:18086/v1/chat/completions \ | `thinking_token_budget` | 생략 | | `include_reasoning` | 숨김 보장용으로 쓰지 않음 | +## Repetition loop 조정 + +dev-corp `gemma4:26b` OpenAI-compatible 호출에서는 반복 출력 loop를 피하기 위한 최소 기준으로 `temperature: 0.2`, `top_p: 0.95`를 설정한다. 두 값을 생략해 provider 기본값에 맡기지 않는다. + +그래도 repetition loop가 발생하면 한 번에 여러 값을 크게 바꾸지 말고, `temperature`는 조금씩 올리고 `top_p`는 조금씩 낮추는 방향으로 조정한다. + ## Reasoning 표시 옵션 응답에 reasoning field가 포함될 수 있다. 표시하지 않는 UX가 필요하면 호출하는 client에서 아래 field를 렌더링 대상에서 제외하는 방식으로 처리할 수 있다.