littlebird13 commited on
Commit
59f434a
·
verified ·
1 Parent(s): 31ec7ee

Update ui_components/settings_header.py

Browse files
Files changed (1) hide show
  1. ui_components/settings_header.py +8 -11
ui_components/settings_header.py CHANGED
@@ -14,18 +14,15 @@ def SettingsHeader():
14
  with antd.Form.Item(form_name="model",
15
  label=get_text("Chat Model", "对话模型")):
16
  with antd.Select(options=MODEL_OPTIONS):
17
- with ms.Slot(
18
- "labelRender",
19
- params_mapping=
20
- """(option) => ({
21
  label: option.label,
22
  link: { href: window.MODEL_OPTIONS_MAP[option.value].link },
23
- })"""
24
- ):
25
  antd.Typography.Text(as_item="label")
26
  antd.Typography.Link(get_text("Model Link", "模型链接"),
27
- href_target="_blank",
28
- as_item="link")
29
 
30
  with antd.Form.Item(form_name="thinking_budget",
31
  label=get_text("Thinking Budget", "思考预算"),
@@ -38,9 +35,9 @@ def SettingsHeader():
38
  min=MIN_THINKING_BUDGET,
39
  elem_style=dict(width=100),
40
  addon_after="k")
41
- with antd.Form.Item(form_name="sys_prompt",
42
- label=get_text("System Prompt", "系统提示")):
43
- antd.Input.Textarea(auto_size=dict(minRows=3, maxRows=6))
44
 
45
  def close_header(state_value):
46
  state_value["open"] = False
 
14
  with antd.Form.Item(form_name="model",
15
  label=get_text("Chat Model", "对话模型")):
16
  with antd.Select(options=MODEL_OPTIONS):
17
+ with ms.Slot("labelRender",
18
+ params_mapping="""(option) => ({
 
 
19
  label: option.label,
20
  link: { href: window.MODEL_OPTIONS_MAP[option.value].link },
21
+ })"""):
 
22
  antd.Typography.Text(as_item="label")
23
  antd.Typography.Link(get_text("Model Link", "模型链接"),
24
+ href_target="_blank",
25
+ as_item="link")
26
 
27
  with antd.Form.Item(form_name="thinking_budget",
28
  label=get_text("Thinking Budget", "思考预算"),
 
35
  min=MIN_THINKING_BUDGET,
36
  elem_style=dict(width=100),
37
  addon_after="k")
38
+ # with antd.Form.Item(form_name="sys_prompt",
39
+ # label=get_text("System Prompt", "系统提示")):
40
+ # antd.Input.Textarea(auto_size=dict(minRows=3, maxRows=6))
41
 
42
  def close_header(state_value):
43
  state_value["open"] = False