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를 렌더링 대상에서 제외하는 방식으로 처리할 수 있다.