reasoning_content field of responses. This field is not present in the outputs of other models.
- Python
- Bash
How to return and view reasoning in your W&B Inference responses
reasoning_content field of responses. This field is not present in the outputs of other models.
import openai
client = openai.OpenAI(
base_url='https://api.inference.wandb.ai/v1',
api_key="<your-api-key>", # Available from https://wandb.ai/authorize
)
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)
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?" }
],
}'
Was this page helpful?