Help us improve these docs. Take our quick survey.
W&B Inference のレスポンスで推論を返し、確認する方法
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?" } ] }'
このページは役に立ちましたか?