ChinaChatWeb searchFunction calling

Explore Baichuan2-Turbo

Use Baichuan's commercial chat model for Chinese and English generation, knowledge tasks, web-enhanced answers, and function calls. Use the playground to give Baichuan2-Turbo a representative input and review its output. Adjust the available settings to shape the result for your task.

Model

Baichuan2-Turbo

Input

Configure your request

Passed directly as the hosted chat-completions messages array.

Documentation

Baichuan2-Turbo field reference

Use this reference to understand how every field in the playground changes the request sent to Baichuan2-Turbo.

messages

Required

Type: JSON array

The conversation sent to the chat model in chronological order. Each JSON item contains a role and its text content.

tools

Optional

Type: JSON array

Default: None

Defines functions the model is allowed to request, including each function’s name, purpose, and JSON parameter schema. Supplying a tool does not execute it—the application must run the requested function and return its result to the model.

Stream response

Optional

Type: Boolean

Default: On

Sends small chunks as the model generates them, allowing the interface to display the beginning of a response sooner. It changes delivery timing rather than model quality; disable it when the client needs one complete response object.

Temperature

Optional

Type: Number

Default: 0.3

Range: 0–1

Adjusts how strongly the model favors its most likely next token. Lower values produce more focused and repeatable output, while higher values allow less-likely choices and increase variety; it only has an effect when sampling is enabled.

Top P

Optional

Type: Number

Default: 0.85

Range: 0–1

Limits sampling to the smallest set of likely tokens whose probabilities add up to this value. Lower settings make output more focused, while a value near 1 keeps more alternatives available; it only affects sampled generation.

Top K

Optional

Type: Integer

Default: 5

Range: 0–Unbounded

Limits sampling at each step to the specified number of most likely next tokens. Smaller values make output more conservative, while larger values preserve more variety; zero commonly means that this filter is disabled.

Maximum output tokens

Optional

Type: Integer

Default: 2048

Range: 1–Unbounded

Caps the length of the generated response in tokens, which are pieces of words rather than whole words. The model can stop naturally before the limit, but a value that is too low may cut off the answer and a high value can increase latency and cost.

Web-search enhancement

Optional

Type: Boolean

Default: Off

Enables the provider’s web-search augmentation before or during generation. This can improve answers about current or niche facts but may increase latency and make output depend on retrieved sources.

Response format

Optional

Type: String

Default: text

Values: Text, JSON object

Chooses between an unrestricted natural-language response and a syntactically valid JSON object. When selecting JSON, explicitly describe the desired keys and mention JSON in the prompt so the model knows what structure to produce.

Tool choice

Optional

Type: String

Default: auto

Values: Auto, None

Determines how the model uses the supplied tool definitions. Auto lets it choose between answering and calling a tool, None forbids tool calls, and Required forces a tool call even if the model could answer directly.