Skip to content

Commit e5aa602

Browse files
author
firecoperana
committed
config reasoning_content in webui and change default to auto
1 parent f8ed961 commit e5aa602

File tree

6 files changed

+29
-26
lines changed

6 files changed

+29
-26
lines changed

common/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ struct gpt_params {
253253
bool use_jinja = false; // NOLINT
254254
std::string system_prompt = "";
255255
bool enable_chat_template = true;
256-
common_reasoning_format reasoning_format = COMMON_REASONING_FORMAT_NONE;
256+
common_reasoning_format reasoning_format = COMMON_REASONING_FORMAT_AUTO;
257257
int reasoning_budget = -1;
258258
bool prefill_assistant = true;
259259

68 Bytes
Binary file not shown.

examples/server/webui/dist/index.html

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

examples/server/webui/src/Config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const CONFIG_DEFAULT = {
1616
showTokensPerSecond: false,
1717
showThoughtInProgress: false,
1818
excludeThoughtOnReq: true,
19+
reasoning_format: 'auto',
1920
// make sure these default values are in sync with `common.h`
2021
samplers: 'dkypmxnt',
2122
temperature: 0.8,
@@ -42,6 +43,7 @@ export const CONFIG_DEFAULT = {
4243
pyIntepreterEnabled: false,
4344
};
4445
export const CONFIG_INFO: Record<string, string> = {
46+
reasoning_format : 'Specify how to parse reasoning content. none: reasoning content in content block. auto: reasoning content in reasoning_content. ',
4547
apiKey: 'Set the API Key if you are using --api-key option for the server.',
4648
systemMessage: 'The starting message that defines how model should behave.',
4749
samplers:

examples/server/webui/src/components/SettingDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import toast from 'react-hot-toast'
2222
type SettKey = keyof typeof CONFIG_DEFAULT;
2323

2424
const BASIC_KEYS: SettKey[] = [
25+
'reasoning_format',
2526
'temperature',
2627
'top_k',
2728
'top_p',

examples/server/webui/src/utils/app.context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export const AppContextProvider = ({
215215
messages,
216216
stream: true,
217217
cache_prompt: true,
218-
reasoning_format: 'none',
218+
reasoning_format: config.reasoning_format===''?'auto':config.reasoning_format,
219219
samplers: config.samplers,
220220
temperature: config.temperature,
221221
dynatemp_range: config.dynatemp_range,
@@ -226,7 +226,7 @@ export const AppContextProvider = ({
226226
typical_p: config.typical_p,
227227
xtc_probability: config.xtc_probability,
228228
xtc_threshold: config.xtc_threshold,
229-
top_n_sigma: config.top_n_sigma,
229+
top_n_sigma: config.top_n_sigma,
230230
repeat_last_n: config.repeat_last_n,
231231
repeat_penalty: config.repeat_penalty,
232232
presence_penalty: config.presence_penalty,

0 commit comments

Comments
 (0)