메인 콘텐츠로 건너뛰기
OpenAI’s GPT OSS 20B와 같은 추론 모델(reasoning model)은 최종 답변 외에 출력의 일부로 추론 단계에 대한 정보를 함께 포함합니다. 이는 자동으로 수행되며 추가 입력 매개변수는 필요하지 않습니다. 모델이 추론 기능을 지원하는지는 UI의 카탈로그 페이지에 있는 지원 기능(Supported Features) 섹션을 확인하여 알 수 있습니다. 응답의 reasoning_content 필드에서 추론 정보를 확인할 수 있습니다. 이 필드는 다른 모델의 출력에는 존재하지 않습니다.
import openai

client = openai.OpenAI(
    base_url='https://api.inference.wandb.ai/v1',
    api_key="<your-api-key>",  # https://wandb.ai/settings에서 API key를 생성하세요
)

response = client.chat.completions.create(
    model="openai/gpt-oss-20b",
    messages=[
        {"role": "user", "content": "3.11 and 3.8, which is greater?"}
    ],
)

print(response.choices[0].message.reasoning_content)
print("--------------------------------")
print(response.choices[0].message.content)