improve usability

This commit is contained in:
josc146 2024-03-13 16:42:26 +08:00
parent cd40261de6
commit c6024520af
6 changed files with 26 additions and 10 deletions

View File

@ -4,7 +4,7 @@
"About": "約", "About": "約",
"Settings": "設定", "Settings": "設定",
"Go to chat page": "チャットページに移動する", "Go to chat page": "チャットページに移動する",
"Manage your configs": "あなたの設定を管理す", "Manage your configs, adjust the starting model and parameters": "設定を管理し、開始モデルとパラメータを調整します",
"Manage models": "モデルの管理", "Manage models": "モデルの管理",
"Run": "実行", "Run": "実行",
"Offline": "オフライン", "Offline": "オフライン",
@ -347,5 +347,9 @@
"Parallel Token Chunk Size": "並列トークンチャンクサイズ", "Parallel Token Chunk Size": "並列トークンチャンクサイズ",
"Maximum tokens to be processed in parallel at once. For high end GPUs, this could be 64 or 128 (faster).": "一度に並列で処理される最大トークン数。高性能なGPUの場合、64または128になります高速。", "Maximum tokens to be processed in parallel at once. For high end GPUs, this could be 64 or 128 (faster).": "一度に並列で処理される最大トークン数。高性能なGPUの場合、64または128になります高速。",
"Global Penalty": "グローバルペナルティ", "Global Penalty": "グローバルペナルティ",
"When generating a response, whether to include the submitted prompt as a penalty factor. By turning this off, you will get the same generated results as official RWKV Gradio. If you find duplicate results in the generated results, turning this on can help avoid generating duplicates.": "レスポンスを生成する際、提出されたプロンプトをペナルティ要因として含めるかどうか。これをオフにすると、公式RWKV Gradioと同じ生成結果を得ることができます。生成された結果に重複がある場合、これをオンにすることで重複の生成を回避するのに役立ちます。" "When generating a response, whether to include the submitted prompt as a penalty factor. By turning this off, you will get the same generated results as official RWKV Gradio. If you find duplicate results in the generated results, turning this on can help avoid generating duplicates.": "レスポンスを生成する際、提出されたプロンプトをペナルティ要因として含めるかどうか。これをオフにすると、公式RWKV Gradioと同じ生成結果を得ることができます。生成された結果に重複がある場合、これをオンにすることで重複の生成を回避するのに役立ちます。",
"Create a new user or AI message content. You can prepare a chat record with AI here, and fill in the responses you want to get from AI in the tone of AI. When you use this preset, the chat record will be processed, and at this point, AI will better understand what you want it to do or what role to play.": "新しいユーザーまたはAIメッセージコンテンツを作成します。ここでAIとのチャット記録を準備し、AIから得たい応答をAIのトーンで記入することができます。このプリセットを使用すると、チャット記録が処理され、この時点でAIはあなたが望むことやどのような役割を果たすかをよりよく理解することができます。",
"The name used internally by the model when processing user message, changing this value helps improve the role-playing effect.": "ユーザーメッセージを処理する際にモデルが内部で使用する名前、この値を変更することで、役割演技の効果を向上させることができます。",
"The name used internally by the model when processing AI message, changing this value helps improve the role-playing effect.": "AIメッセージを処理する際にモデルが内部で使用する名前、この値を変更することで、役割演技の効果を向上させることができます。",
"Inside the model, there is a default prompt to improve the model's handling of common issues, but it may degrade the role-playing effect. You can disable this option to achieve a better role-playing effect.": "モデル内部には、一般的な問題の処理を改善するためのデフォルトのプロンプトがありますが、役割演技の効果を低下させる可能性があります。このオプションを無効にすることで、より良い役割演技効果を得ることができます。"
} }

View File

@ -4,7 +4,7 @@
"About": "关于", "About": "关于",
"Settings": "设置", "Settings": "设置",
"Go to chat page": "前往聊天页", "Go to chat page": "前往聊天页",
"Manage your configs": "管理你的配置", "Manage your configs, adjust the starting model and parameters": "管理你的配置, 调整启动的模型和参数",
"Manage models": "管理模型", "Manage models": "管理模型",
"Run": "运行", "Run": "运行",
"Offline": "离线", "Offline": "离线",
@ -347,5 +347,9 @@
"Parallel Token Chunk Size": "并行Token块大小", "Parallel Token Chunk Size": "并行Token块大小",
"Maximum tokens to be processed in parallel at once. For high end GPUs, this could be 64 or 128 (faster).": "一次最多可以并行处理的token数量. 对于高端显卡, 这可以是64或128 (更快)", "Maximum tokens to be processed in parallel at once. For high end GPUs, this could be 64 or 128 (faster).": "一次最多可以并行处理的token数量. 对于高端显卡, 这可以是64或128 (更快)",
"Global Penalty": "全局惩罚", "Global Penalty": "全局惩罚",
"When generating a response, whether to include the submitted prompt as a penalty factor. By turning this off, you will get the same generated results as official RWKV Gradio. If you find duplicate results in the generated results, turning this on can help avoid generating duplicates.": "生成响应时, 是否将提交的prompt也纳入到惩罚项. 关闭此项将得到与RWKV官方Gradio完全一致的生成结果. 如果你发现生成结果出现重复, 那么开启此项有助于避免生成重复" "When generating a response, whether to include the submitted prompt as a penalty factor. By turning this off, you will get the same generated results as official RWKV Gradio. If you find duplicate results in the generated results, turning this on can help avoid generating duplicates.": "生成响应时, 是否将提交的prompt也纳入到惩罚项. 关闭此项将得到与RWKV官方Gradio完全一致的生成结果. 如果你发现生成结果出现重复, 那么开启此项有助于避免生成重复",
"Create a new user or AI message content. You can prepare a chat record with AI here, and fill in the responses you want to get from AI in the tone of AI. When you use this preset, the chat record will be processed, and at this point, AI will better understand what you want it to do or what role to play.": "新建一个 用户 或 AI 的发言内容. 你可以在这里准备好一段你与 AI 的聊天记录, 并用 AI 的口吻正确填写你想得到的 AI 的回复, 这样你在使用这个预设时, 这些聊天记录也会被处理, 并且此时 AI 能更好地理解你希望它做什么 / 扮演什么样的角色",
"The name used internally by the model when processing user message, changing this value helps improve the role-playing effect.": "模型内部处理用户发言时使用的名称, 更改此值有助于改善角色扮演效果",
"The name used internally by the model when processing AI message, changing this value helps improve the role-playing effect.": "模型内部处理AI发言时使用的名称, 更改此值有助于改善角色扮演效果",
"Inside the model, there is a default prompt to improve the model's handling of common issues, but it may degrade the role-playing effect. You can disable this option to achieve a better role-playing effect.": "模型内部有一个默认提示来改善模型处理常规问题的效果, 但它可能会让角色扮演的效果变差, 你可以关闭此选项来获得更好的角色扮演效果"
} }

View File

@ -26,10 +26,12 @@ export const ToolTipButton: FC<{
onClick, onClick,
showDelay = 0 showDelay = 0
}) => { }) => {
return ( return (desc ?
<Tooltip content={desc} showDelay={showDelay} hideDelay={0} relationship="label"> <Tooltip content={desc} showDelay={showDelay} hideDelay={0} relationship="label">
<Button style={style} className={className} disabled={disabled} icon={icon} onClick={onClick} size={size} <Button style={style} className={className} disabled={disabled} icon={icon} onClick={onClick} size={size}
shape={shape} appearance={appearance}>{text}</Button> shape={shape} appearance={appearance}>{text}</Button>
</Tooltip> </Tooltip> :
<Button style={style} className={className} disabled={disabled} icon={icon} onClick={onClick} size={size}
shape={shape} appearance={appearance}>{text}</Button>
); );
}; };

View File

@ -37,7 +37,7 @@ const clientNavCards: NavCard[] = [
}, },
{ {
label: 'Configs', label: 'Configs',
desc: 'Manage your configs', desc: 'Manage your configs, adjust the starting model and parameters',
path: '/configs', path: '/configs',
icon: <DocumentSettings20Regular /> icon: <DocumentSettings20Regular />
}, },

View File

@ -3,7 +3,7 @@ import { DragDropContext, Draggable, Droppable, DropResult } from 'react-beautif
import commonStore from '../../stores/commonStore'; import commonStore from '../../stores/commonStore';
import { observer } from 'mobx-react-lite'; import { observer } from 'mobx-react-lite';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { Button, Card, Dropdown, Option, Textarea } from '@fluentui/react-components'; import { Card, Dropdown, Option, Textarea } from '@fluentui/react-components';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { ToolTipButton } from '../../components/ToolTipButton'; import { ToolTipButton } from '../../components/ToolTipButton';
import { Delete20Regular, ReOrderDotsVertical20Regular } from '@fluentui/react-icons'; import { Delete20Regular, ReOrderDotsVertical20Regular } from '@fluentui/react-icons';
@ -84,7 +84,10 @@ const MessagesEditor: FC = observer(() => {
return ( return (
<div className="grid grid-cols-1 gap-2 overflow-hidden"> <div className="grid grid-cols-1 gap-2 overflow-hidden">
<Button style={{ width: '100%' }} onClick={createNewItem}>{t('New')}</Button> <ToolTipButton text={t('New')}
desc={t('Create a new user or AI message content. You can prepare a chat record with AI here, and fill in the responses you want to get from AI in the tone of AI. When you use this preset, the chat record will be processed, and at this point, AI will better understand what you want it to do or what role to play.')}
style={{ width: '100%' }}
onClick={createNewItem} />
<div className="overflow-x-hidden overflow-y-auto p-2"> <div className="overflow-x-hidden overflow-y-auto p-2">
<DragDropContext onDragEnd={onDragEnd}> <DragDropContext onDragEnd={onDragEnd}>
<Droppable droppableId="droppable"> <Droppable droppableId="droppable">

View File

@ -230,6 +230,7 @@ const ChatPresetEditor: FC<{
editingMessages ? editingMessages ?
<div className="flex flex-col gap-1"> <div className="flex flex-col gap-1">
<Labeled flex spaceBetween label={t('Insert default system prompt at the beginning')} <Labeled flex spaceBetween label={t('Insert default system prompt at the beginning')}
desc={t('Inside the model, there is a default prompt to improve the model\'s handling of common issues, but it may degrade the role-playing effect. You can disable this option to achieve a better role-playing effect.')}
content={ content={
<Switch checked={editingPreset.presystem === undefined ? true : editingPreset.presystem} <Switch checked={editingPreset.presystem === undefined ? true : editingPreset.presystem}
onChange={(e, data) => { onChange={(e, data) => {
@ -239,6 +240,7 @@ const ChatPresetEditor: FC<{
}} /> }} />
} /> } />
<Labeled flex breakline label={t('User Name')} <Labeled flex breakline label={t('User Name')}
desc={t('The name used internally by the model when processing user message, changing this value helps improve the role-playing effect.')}
content={ content={
<Input placeholder="User" value={editingPreset.userName} onChange={(e, data) => { <Input placeholder="User" value={editingPreset.userName} onChange={(e, data) => {
setEditingPreset({ setEditingPreset({
@ -247,6 +249,7 @@ const ChatPresetEditor: FC<{
}} /> }} />
} /> } />
<Labeled flex breakline label={t('Assistant Name')} <Labeled flex breakline label={t('Assistant Name')}
desc={t('The name used internally by the model when processing AI message, changing this value helps improve the role-playing effect.')}
content={ content={
<Input placeholder="Assistant" value={editingPreset.assistantName} onChange={(e, data) => { <Input placeholder="Assistant" value={editingPreset.assistantName} onChange={(e, data) => {
setEditingPreset({ setEditingPreset({