Skip to content

Commit

Permalink
feat: 将密钥输入框挪到用户可见的区域
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Nov 21, 2023
1 parent 6ba3dba commit 8c5d22e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ChuanhuChatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ def create_new_model():
obj="toolbox"), elem_classes="close-btn")
with gr.Tabs(elem_id="chuanhu-toolbox-tabs"):
with gr.Tab(label=i18n("对话")):
keyTxt = gr.Textbox(
show_label=True,
placeholder=f"Your API-key...",
value=hide_middle_chars(user_api_key.value),
type="password",
visible=not HIDE_MY_KEY,
label="API-Key",
)
with gr.Accordion(label="Prompt", open=True):
systemPromptTxt = gr.Textbox(
show_label=True,
Expand Down Expand Up @@ -340,14 +348,6 @@ def create_new_model():
obj="box"), elem_classes="close-btn")
with gr.Tabs(elem_id="chuanhu-setting-tabs"):
with gr.Tab(label=i18n("模型")):
keyTxt = gr.Textbox(
show_label=True,
placeholder=f"Your API-key...",
value=hide_middle_chars(user_api_key.value),
type="password",
visible=not HIDE_MY_KEY,
label="API-Key",
)
if multi_api_key:
usageTxt = gr.Markdown(i18n(
"多账号模式已开启,无需输入key,可直接开始对话"), elem_id="usage-display", elem_classes="insert-block", visible=show_api_billing)
Expand Down

0 comments on commit 8c5d22e

Please sign in to comment.