Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-sandboxes-update-banner.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
OpenAI’s GPT OSS 20B のような推論モデルは、最終的な回答に加えて、返される出力の一部として推論ステップに関する情報を含みます。これは自動で行われるため、追加の入力パラメーターは必要ありません。
モデルが推論をサポートしているかどうかは、UI のカタログページにある Supported Features セクションを確認することで判断できます。
推論情報は、レスポンスの reasoning フィールドで確認できます。推論モデルではないモデルのレスポンスでは、このフィールドの値は null です。
import openai
client = openai.OpenAI(
base_url='https://api.inference.wandb.ai/v1',
api_key="<your-api-key>", # https://wandb.ai/settings でAPIキーを作成します
)
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)
print("--------------------------------")
print(response.choices[0].message.content)
curl https://api.inference.wandb.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-key>" \
-d '{
"model": "openai/gpt-oss-20b",
"messages": [
{ "role": "user", "content": "3.11 and 3.8, which is greater?" }
]
}'