Skip to Content
API CallText GenerationDoubao model thinking switch

Doubao Model Thinking Feature Parameter Description

Concept Introduction

The thinking feature is a characteristic parameter of the Doubao model used to control whether the model displays its thought process before responding. This feature is applicable in scenarios where observing the model’s reasoning process is necessary.

Parameter Description

The thinking parameter is a structure used to configure the model’s thought process.

Object Structure:

FieldTypeRequiredDescription
thinking.typeStringYesControls whether to display the thought process.

type Field Optional Values:

  • enabled: Forces the thought process to be displayed.
  • disabled: Forces the thought process to be hidden.
  • auto: The model automatically decides whether to display the thought process.

Example JSON

{ "model": "ByteDance/doubao-seed-1.6", ... "thinking": { "type": "enabled" } }

Model support is shown in the table below:

  • ByteDance/doubao-seed-1.6
  • ByteDance/doubao-1.5-thinking-vision-pro

API Interface Example

import json import requests # Configure API key api_key = "******" # Replace with your APIKEY url = "https://api.umodelverse.ai/v1/chat/completions" headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"} data = { "model": "ByteDance/doubao-seed-1.6", # Specify model "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Which is greater, 9.9 or 9.11", # User question } ], } ], "thinking": {"type": "enabled"}, # Enable thinking feature, options are enabled, disabled, auto } try: response = requests.post(url, headers=headers, json=data) response.raise_for_status() print("Request successful!") print(json.dumps(response.json(), indent=2, ensure_ascii=False)) except requests.exceptions.RequestException as e: print(f"Request failed: {e}")

Notices

  1. The thinking feature will add a small amount of response time.
  2. For simple questions, it is recommended to use the disabled or auto mode.
  3. For complex reasoning problems, using the enabled mode can provide better interpretability.