diff --git a/frontend/src/_locales/zh-hans/main.json b/frontend/src/_locales/zh-hans/main.json index 9dda156..9e5eb0f 100644 --- a/frontend/src/_locales/zh-hans/main.json +++ b/frontend/src/_locales/zh-hans/main.json @@ -75,5 +75,14 @@ "New Version Available": "新版本可用", "Update": "更新", "Please click the button in the top right corner to start the model": "请点击右上角的按钮启动模型", - "Update Error, Please restart this program": "更新出错, 请重启本程序" + "Update Error, Please restart this program": "更新出错, 请重启本程序", + "Open the following URL with your browser to view the API documentation": "使用浏览器打开以下地址查看API文档", + "By default, the maximum number of tokens that can be answered in a single response, it can be changed by the user by specifying API parameters.": "默认情况下, 单个回复最多回答的token数目, 用户可以通过自行指定API参数改变这个值", + "Sampling temperature, the higher the stronger the randomness and creativity, while the lower, the more focused and deterministic it will be.": "采样温度, 越大随机性越强, 更具创造力, 越小则越保守稳定", + "Consider the results of the top n% probability mass, 0.1 considers the top 10%, with higher quality but more conservative, 1 considers all results, with lower quality but more diverse.": "考虑前 n% 概率质量的结果, 0.1 考虑前 10%, 质量更高, 但更保守, 1 考虑所有质量结果, 质量降低, 但更多样", + "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.": "存在惩罚. 正值根据新token在至今的文本中是否出现过, 来对其进行惩罚, 从而增加了模型涉及新话题的可能性", + "Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.": "频率惩罚. 正值根据新token在至今的文本中出现的频率/次数, 来对其进行惩罚, 从而减少模型原封不动地重复相同句子的可能性", + "int8 uses less VRAM, and is faster, but has slightly lower quality. fp16 has higher quality, and fp32 has the best quality.": "int8占用显存更低, 速度更快, 但质量略微下降. fp16质量更好, fp32质量最好", + "Number of the neural network layers loaded into VRAM, the more you load, the faster the speed, but it consumes more VRAM.": "载入显存的神经网络层数, 载入越多, 速度越快, 但显存消耗越大", + "Whether to use CPU to calculate the last output layer of the neural network with FP32 precision to obtain better quality.": "是否使用cpu以fp32精度计算神经网络的最后一层输出层, 以获得更好的质量" } \ No newline at end of file diff --git a/frontend/src/components/Labeled.tsx b/frontend/src/components/Labeled.tsx index 3548e7f..ffbfd22 100644 --- a/frontend/src/components/Labeled.tsx +++ b/frontend/src/components/Labeled.tsx @@ -3,7 +3,7 @@ import {Label, Tooltip} from '@fluentui/react-components'; import classnames from 'classnames'; export const Labeled: FC<{ - label: string; desc?: string, content: ReactElement, flex?: boolean, spaceBetween?: boolean + label: string; desc?: string | null, content: ReactElement, flex?: boolean, spaceBetween?: boolean }> = ({ label, desc, diff --git a/frontend/src/pages/Configs.tsx b/frontend/src/pages/Configs.tsx index d5ff948..d02e96f 100644 --- a/frontend/src/pages/Configs.tsx +++ b/frontend/src/pages/Configs.tsx @@ -22,8 +22,8 @@ export const Configs: FC = observer(() => { const {t} = useTranslation(); const [selectedIndex, setSelectedIndex] = React.useState(commonStore.currentModelConfigIndex); const [selectedConfig, setSelectedConfig] = React.useState(commonStore.modelConfigs[selectedIndex]); - const navigate = useNavigate(); + const port = selectedConfig.apiParameters.apiPort; const updateSelectedIndex = (newIndex: number) => { setSelectedIndex(newIndex); @@ -104,55 +104,72 @@ export const Configs: FC = observer(() => { desc={t('Hover your mouse over the text to view a detailed description. Settings marked with * will take effect immediately after being saved.')} content={