Skip to content

Commit

Permalink
feat: add tips for preset
Browse files Browse the repository at this point in the history
  • Loading branch information
OrenZhang committed Jun 29, 2024
1 parent 8a7f6a6 commit 8fbb293
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/ChatInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ defineExpose({reGenerate, promptForm});
id="chat-input-system-define-content-tag"
@change="doSelectSystemPreset"
:placeholder="$t('PleaseChoosePreset')"
:allow-search="true"
>
<a-option
v-for="item in systemPresets"
Expand All @@ -517,6 +518,9 @@ defineExpose({reGenerate, promptForm});
:auto-size="{minRows: 3, maxRows: 10}"
:placeholder="$t('SystemDefine')"
/>
<div class="model-ignore-system-tips">
{{ $t('ModelIgnoreSystemDefineTips') }}
</div>
<a-space style="width: 100%; display: flex; justify-content: flex-end">
<a-button
v-if="customSystemDefine"
Expand Down Expand Up @@ -569,4 +573,9 @@ defineExpose({reGenerate, promptForm});
#chat-input-system-define-content-tag {
width: 100%;
}
.model-ignore-system-tips {
color: var(--color-neutral-6);
font-size: 12px;
}
</style>
1 change: 1 addition & 0 deletions src/locale/en-us.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const mEnUS = {
Save: 'Save',
PleaseChoosePreset: 'Please choose one preset',
Remove: 'Remove',
ModelIgnoreSystemDefineTips: 'Some models may ignore presets, if the output does not meet expectations, try switching models.',
};

export default mEnUS;
1 change: 1 addition & 0 deletions src/locale/zh-cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const mZhCN = {
Save: '保存',
PleaseChoosePreset: '请选择预设',
Remove: '移除',
ModelIgnoreSystemDefineTips: '部分模型可能会忽略预设,如果输出不符合预期,请切换模型',
};

export default mZhCN;

0 comments on commit 8fbb293

Please sign in to comment.