Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5729d9fc62 | ||
|
|
bb8af451f6 | ||
|
|
ed330566e3 | ||
|
|
673ecb489e | ||
|
|
5192e31bac | ||
|
|
9f080b63e0 | ||
|
|
77ce87d209 | ||
|
|
dc50cf84f2 | ||
|
|
f439b3d382 | ||
|
|
03a494e1f1 | ||
|
|
bac4582144 | ||
|
|
1676c5b7e6 | ||
|
|
c7ed4b07c2 | ||
|
|
bcb38d991a | ||
|
|
1176dba282 | ||
|
|
c741b2a203 |
@@ -70,6 +70,10 @@ English | [简体中文](README_ZH.md)
|
||||
|
||||

|
||||
|
||||
### Completion
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||

|
||||
|
||||
@@ -70,6 +70,10 @@ API兼容的接口,这意味着一切ChatGPT客户端都是RWKV客户端。
|
||||
|
||||

|
||||
|
||||
### 补全
|
||||
|
||||

|
||||
|
||||
### 配置
|
||||
|
||||

|
||||
|
||||
@@ -6,12 +6,12 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func (a *App) StartServer(port int) (string, error) {
|
||||
func (a *App) StartServer(port int, host string) (string, error) {
|
||||
python, err := GetPython()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return Cmd(python, "./backend-python/main.py", strconv.Itoa(port))
|
||||
return Cmd(python, "./backend-python/main.py", strconv.Itoa(port), host)
|
||||
}
|
||||
|
||||
func (a *App) ConvertModel(modelPath string, strategy string, outPath string) (string, error) {
|
||||
|
||||
@@ -64,5 +64,9 @@ def debug():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run("main:app", port=8000 if len(sys.argv) == 1 else int(sys.argv[1]))
|
||||
uvicorn.run(
|
||||
"main:app",
|
||||
port=8000 if len(sys.argv) < 2 else int(sys.argv[1]),
|
||||
host="127.0.0.1" if len(sys.argv) < 3 else sys.argv[2],
|
||||
)
|
||||
# debug()
|
||||
|
||||
@@ -11,6 +11,10 @@ import global_var
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
interface = ":"
|
||||
user = "Bob"
|
||||
bot = "Alice"
|
||||
|
||||
|
||||
class Message(BaseModel):
|
||||
role: str
|
||||
@@ -40,11 +44,36 @@ async def chat_completions(body: ChatCompletionBody, request: Request):
|
||||
else:
|
||||
raise HTTPException(status.HTTP_400_BAD_REQUEST, "no question found")
|
||||
|
||||
completion_text = ""
|
||||
completion_text = f"""
|
||||
The following is a coherent verbose detailed conversation between a girl named {bot} and her friend {user}. \
|
||||
{bot} is very intelligent, creative and friendly. \
|
||||
{bot} is unlikely to disagree with {user}, and {bot} doesn't like to ask {user} questions. \
|
||||
{bot} likes to tell {user} a lot about herself and her opinions. \
|
||||
{bot} usually gives {user} kind, helpful and informative advices.\n
|
||||
"""
|
||||
for message in body.messages:
|
||||
if message.role == "user":
|
||||
if message.role == "system":
|
||||
completion_text = (
|
||||
f"The following is a coherent verbose detailed conversation between a girl named {bot} and her friend {user}. "
|
||||
+ message.content.replace("\\n", "\n")
|
||||
.replace("\r\n", "\n")
|
||||
.replace("\n\n", "\n")
|
||||
.replace("\n", " ")
|
||||
.strip()
|
||||
.replace("You are", f"{bot} is")
|
||||
.replace("you are", f"{bot} is")
|
||||
.replace("You're", f"{bot} is")
|
||||
.replace("you're", f"{bot} is")
|
||||
.replace("You", f"{bot}")
|
||||
.replace("you", f"{bot}")
|
||||
.replace("Your", f"{bot}'s")
|
||||
.replace("your", f"{bot}'s")
|
||||
.replace("你", f"{bot}")
|
||||
+ "\n\n"
|
||||
)
|
||||
elif message.role == "user":
|
||||
completion_text += (
|
||||
"Bob: "
|
||||
f"{user}{interface} "
|
||||
+ message.content.replace("\\n", "\n")
|
||||
.replace("\r\n", "\n")
|
||||
.replace("\n\n", "\n")
|
||||
@@ -53,14 +82,14 @@ async def chat_completions(body: ChatCompletionBody, request: Request):
|
||||
)
|
||||
elif message.role == "assistant":
|
||||
completion_text += (
|
||||
"Alice: "
|
||||
f"{bot}{interface} "
|
||||
+ message.content.replace("\\n", "\n")
|
||||
.replace("\r\n", "\n")
|
||||
.replace("\n\n", "\n")
|
||||
.strip()
|
||||
+ "\n\n"
|
||||
)
|
||||
completion_text += "Alice:"
|
||||
completion_text += f"{bot}{interface}"
|
||||
|
||||
async def eval_rwkv():
|
||||
while completion_lock.locked():
|
||||
@@ -73,7 +102,7 @@ async def chat_completions(body: ChatCompletionBody, request: Request):
|
||||
for response, delta in rwkv_generate(
|
||||
model,
|
||||
completion_text,
|
||||
stop="\n\nBob" if body.stop is None else body.stop,
|
||||
stop=f"\n\n{user}" if body.stop is None else body.stop,
|
||||
):
|
||||
if await request.is_disconnected():
|
||||
break
|
||||
@@ -90,8 +119,9 @@ async def chat_completions(body: ChatCompletionBody, request: Request):
|
||||
],
|
||||
}
|
||||
)
|
||||
# torch_gc()
|
||||
completion_lock.release()
|
||||
if await request.is_disconnected():
|
||||
completion_lock.release()
|
||||
return
|
||||
yield json.dumps(
|
||||
{
|
||||
@@ -112,12 +142,13 @@ async def chat_completions(body: ChatCompletionBody, request: Request):
|
||||
for response, delta in rwkv_generate(
|
||||
model,
|
||||
completion_text,
|
||||
stop="\n\nBob" if body.stop is None else body.stop,
|
||||
stop=f"\n\n{user}" if body.stop is None else body.stop,
|
||||
):
|
||||
if await request.is_disconnected():
|
||||
break
|
||||
# torch_gc()
|
||||
completion_lock.release()
|
||||
if await request.is_disconnected():
|
||||
completion_lock.release()
|
||||
return
|
||||
yield {
|
||||
"response": response,
|
||||
@@ -133,8 +164,6 @@ async def chat_completions(body: ChatCompletionBody, request: Request):
|
||||
}
|
||||
],
|
||||
}
|
||||
# torch_gc()
|
||||
completion_lock.release()
|
||||
|
||||
if body.stream:
|
||||
return EventSourceResponse(eval_rwkv())
|
||||
@@ -182,8 +211,9 @@ async def completions(body: CompletionBody, request: Request):
|
||||
],
|
||||
}
|
||||
)
|
||||
# torch_gc()
|
||||
completion_lock.release()
|
||||
if await request.is_disconnected():
|
||||
completion_lock.release()
|
||||
return
|
||||
yield json.dumps(
|
||||
{
|
||||
@@ -206,8 +236,9 @@ async def completions(body: CompletionBody, request: Request):
|
||||
):
|
||||
if await request.is_disconnected():
|
||||
break
|
||||
# torch_gc()
|
||||
completion_lock.release()
|
||||
if await request.is_disconnected():
|
||||
completion_lock.release()
|
||||
return
|
||||
yield {
|
||||
"response": response,
|
||||
@@ -220,8 +251,6 @@ async def completions(body: CompletionBody, request: Request):
|
||||
}
|
||||
],
|
||||
}
|
||||
# torch_gc()
|
||||
completion_lock.release()
|
||||
|
||||
if body.stream:
|
||||
return EventSourceResponse(eval_rwkv())
|
||||
|
||||
Binary file not shown.
@@ -20,11 +20,11 @@
|
||||
"Manage Models": "管理模型",
|
||||
"Model": "模型",
|
||||
"Model Parameters": "模型参数",
|
||||
"Frequency Penalty *": "Frequency Penalty *",
|
||||
"Presence Penalty *": "Presence Penalty *",
|
||||
"Top_P *": "Top_P *",
|
||||
"Temperature *": "Temperature *",
|
||||
"Max Response Token *": "最大响应 Token *",
|
||||
"Frequency Penalty": "Frequency Penalty",
|
||||
"Presence Penalty": "Presence Penalty",
|
||||
"Top_P": "Top_P",
|
||||
"Temperature": "Temperature",
|
||||
"Max Response Token": "最大响应 Token",
|
||||
"API Port": "API 端口",
|
||||
"Hover your mouse over the text to view a detailed description. Settings marked with * will take effect immediately after being saved.": "把鼠标悬停在文本上查看详细描述. 标记了星号 * 的设置在保存后会立即生效.",
|
||||
"Default API Parameters": "默认 API 参数",
|
||||
@@ -75,7 +75,7 @@
|
||||
"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": "更新出错",
|
||||
"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.": "采样温度, 越大随机性越强, 更具创造力, 越小则越保守稳定",
|
||||
@@ -102,5 +102,19 @@
|
||||
"Enabling this option can greatly improve inference speed, but there may be compatibility issues. If it fails to start, please turn off this option.": "开启这个选项能大大提升推理速度,但可能存在兼容性问题,如果启动失败,请关闭此选项",
|
||||
"Supported custom cuda file not found": "没有找到支持的自定义cuda文件",
|
||||
"Failed to copy custom cuda file": "自定义cuda文件复制失败",
|
||||
"Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.": "正在下载更新,请等待。如果一直未完成,请从Github手动下载并覆盖原程序"
|
||||
"Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.": "正在下载更新,请等待。如果一直未完成,请从Github手动下载并覆盖原程序",
|
||||
"Completion": "补全",
|
||||
"Parameters": "参数",
|
||||
"Stop Sequences": "停止词",
|
||||
"When this content appears in the response result, the generation will end.": "响应结果出现该内容时就结束生成",
|
||||
"Reset": "重置",
|
||||
"Generate": "生成",
|
||||
"Writer": "写作",
|
||||
"Translator": "翻译",
|
||||
"Catgirl": "猫娘",
|
||||
"Explain Code": "代码解释",
|
||||
"Werewolf": "狼人杀",
|
||||
"Blank": "空白",
|
||||
"The following is an epic science fiction masterpiece that is immortalized, with delicate descriptions and grand depictions of interstellar civilization wars.\nChapter 1.\n": "以下是不朽的科幻史诗巨著,描写细腻,刻画了宏大的星际文明战争。\n第一章\n",
|
||||
"API Host": "API主机"
|
||||
}
|
||||
@@ -3,18 +3,25 @@ import { Label, Tooltip } from '@fluentui/react-components';
|
||||
import classnames from 'classnames';
|
||||
|
||||
export const Labeled: FC<{
|
||||
label: string; desc?: string | null, content: ReactElement, flex?: boolean, spaceBetween?: boolean
|
||||
label: string;
|
||||
desc?: string | null,
|
||||
content: ReactElement,
|
||||
flex?: boolean,
|
||||
spaceBetween?: boolean,
|
||||
breakline?: boolean
|
||||
}> = ({
|
||||
label,
|
||||
desc,
|
||||
content,
|
||||
flex,
|
||||
spaceBetween
|
||||
spaceBetween,
|
||||
breakline
|
||||
}) => {
|
||||
return (
|
||||
<div className={classnames(
|
||||
'items-center',
|
||||
!breakline ? 'items-center' : '',
|
||||
flex ? 'flex' : 'grid grid-cols-2',
|
||||
breakline ? 'flex-col' : '',
|
||||
spaceBetween && 'justify-between')
|
||||
}>
|
||||
{desc ?
|
||||
|
||||
@@ -110,7 +110,7 @@ export const RunButton: FC<{ onClickRun?: MouseEventHandler, iconMode?: boolean
|
||||
|
||||
await exit(1000).catch(() => {
|
||||
});
|
||||
StartServer(port);
|
||||
StartServer(port, commonStore.settings.host);
|
||||
setTimeout(WindowShow, 1000);
|
||||
|
||||
let timeoutCount = 6;
|
||||
@@ -144,8 +144,12 @@ export const RunButton: FC<{ onClickRun?: MouseEventHandler, iconMode?: boolean
|
||||
if (!exist) CopyFile('./backend-python/wkv_cuda_utils/wkv_cuda_model.py', './py310/Lib/site-packages/rwkv/model.py');
|
||||
});
|
||||
await CopyFile(customCudaFile, './py310/Lib/site-packages/rwkv/wkv_cuda.pyd').catch(() => {
|
||||
customCudaFile = '';
|
||||
toast(t('Failed to copy custom cuda file'), { type: 'error' });
|
||||
FileExists('./py310/Lib/site-packages/rwkv/wkv_cuda.pyd').then((exist) => {
|
||||
if (!exist) {
|
||||
customCudaFile = '';
|
||||
toast(t('Failed to copy custom cuda file'), { type: 'error' });
|
||||
}
|
||||
});
|
||||
});
|
||||
} else
|
||||
toast(t('Supported custom cuda file not found'), { type: 'warning' });
|
||||
|
||||
46
frontend/src/components/WorkHeader.tsx
Normal file
46
frontend/src/components/WorkHeader.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import React, { FC } from 'react';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import { Divider, PresenceBadge, Text } from '@fluentui/react-components';
|
||||
import commonStore, { ModelStatus } from '../stores/commonStore';
|
||||
import { ConfigSelector } from './ConfigSelector';
|
||||
import { RunButton } from './RunButton';
|
||||
import { PresenceBadgeStatus } from '@fluentui/react-badge';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const statusText = {
|
||||
[ModelStatus.Offline]: 'Offline',
|
||||
[ModelStatus.Starting]: 'Starting',
|
||||
[ModelStatus.Loading]: 'Loading',
|
||||
[ModelStatus.Working]: 'Working'
|
||||
};
|
||||
|
||||
const badgeStatus: { [modelStatus: number]: PresenceBadgeStatus } = {
|
||||
[ModelStatus.Offline]: 'unknown',
|
||||
[ModelStatus.Starting]: 'away',
|
||||
[ModelStatus.Loading]: 'away',
|
||||
[ModelStatus.Working]: 'available'
|
||||
};
|
||||
|
||||
export const WorkHeader: FC = observer(() => {
|
||||
const { t } = useTranslation();
|
||||
const port = commonStore.getCurrentModelConfig().apiParameters.apiPort;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-1">
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex items-center gap-2">
|
||||
<PresenceBadge status={badgeStatus[commonStore.status.modelStatus]} />
|
||||
<Text size={100}>{t('Model Status') + ': ' + t(statusText[commonStore.status.modelStatus])}</Text>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<ConfigSelector size="small" />
|
||||
<RunButton iconMode />
|
||||
</div>
|
||||
</div>
|
||||
<Text size={100}>
|
||||
{t('This tool\'s API is compatible with OpenAI API. It can be used with any ChatGPT tool you like. Go to the settings of some ChatGPT tool, replace the \'https://api.openai.com\' part in the API address with \'') + `http://127.0.0.1:${port}` + '\'.'}
|
||||
</Text>
|
||||
<Divider style={{ flexGrow: 0 }} />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
@@ -1,11 +1,8 @@
|
||||
import React, { FC, useEffect, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { RunButton } from '../components/RunButton';
|
||||
import { Avatar, Divider, PresenceBadge, Text, Textarea } from '@fluentui/react-components';
|
||||
import { Avatar, PresenceBadge, Textarea } from '@fluentui/react-components';
|
||||
import commonStore, { ModelStatus } from '../stores/commonStore';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import { PresenceBadgeStatus } from '@fluentui/react-badge';
|
||||
import { ConfigSelector } from '../components/ConfigSelector';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import classnames from 'classnames';
|
||||
import { fetchEventSource } from '@microsoft/fetch-event-source';
|
||||
@@ -17,6 +14,7 @@ import { ArrowCircleUp28Regular, Delete28Regular, RecordStop28Regular } from '@f
|
||||
import { CopyButton } from '../components/CopyButton';
|
||||
import { ReadButton } from '../components/ReadButton';
|
||||
import { toast } from 'react-toastify';
|
||||
import { WorkHeader } from '../components/WorkHeader';
|
||||
|
||||
export const userName = 'M E';
|
||||
export const botName = 'A I';
|
||||
@@ -293,40 +291,10 @@ const ChatPanel: FC = observer(() => {
|
||||
);
|
||||
});
|
||||
|
||||
const statusText = {
|
||||
[ModelStatus.Offline]: 'Offline',
|
||||
[ModelStatus.Starting]: 'Starting',
|
||||
[ModelStatus.Loading]: 'Loading',
|
||||
[ModelStatus.Working]: 'Working'
|
||||
};
|
||||
|
||||
const badgeStatus: { [modelStatus: number]: PresenceBadgeStatus } = {
|
||||
[ModelStatus.Offline]: 'unknown',
|
||||
[ModelStatus.Starting]: 'away',
|
||||
[ModelStatus.Loading]: 'away',
|
||||
[ModelStatus.Working]: 'available'
|
||||
};
|
||||
|
||||
export const Chat: FC = observer(() => {
|
||||
const { t } = useTranslation();
|
||||
const port = commonStore.getCurrentModelConfig().apiParameters.apiPort;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-1 p-2 h-full overflow-hidden">
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex items-center gap-2">
|
||||
<PresenceBadge status={badgeStatus[commonStore.status.modelStatus]} />
|
||||
<Text size={100}>{t('Model Status') + ': ' + t(statusText[commonStore.status.modelStatus])}</Text>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<ConfigSelector size="small" />
|
||||
<RunButton iconMode />
|
||||
</div>
|
||||
</div>
|
||||
<Text size={100}>
|
||||
{t('This tool\'s API is compatible with OpenAI API. It can be used with any ChatGPT tool you like. Go to the settings of some ChatGPT tool, replace the \'https://api.openai.com\' part in the API address with \'') + `http://127.0.0.1:${port}` + '\'.'}
|
||||
</Text>
|
||||
<Divider style={{ flexGrow: 0 }} />
|
||||
<WorkHeader />
|
||||
<ChatPanel />
|
||||
</div>
|
||||
);
|
||||
|
||||
310
frontend/src/pages/Completion.tsx
Normal file
310
frontend/src/pages/Completion.tsx
Normal file
@@ -0,0 +1,310 @@
|
||||
import React, { FC, useEffect, useRef } from 'react';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import { WorkHeader } from '../components/WorkHeader';
|
||||
import { Button, Dropdown, Input, Option, Textarea } from '@fluentui/react-components';
|
||||
import { Labeled } from '../components/Labeled';
|
||||
import { ValuedSlider } from '../components/ValuedSlider';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ApiParameters } from './Configs';
|
||||
import commonStore, { ModelStatus } from '../stores/commonStore';
|
||||
import { fetchEventSource } from '@microsoft/fetch-event-source';
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
export type CompletionParams = Omit<ApiParameters, 'apiPort'> & { stop: string }
|
||||
|
||||
export type CompletionPreset = {
|
||||
name: string,
|
||||
prompt: string,
|
||||
params: CompletionParams
|
||||
}
|
||||
|
||||
export const defaultPresets: CompletionPreset[] = [{
|
||||
name: 'Writer',
|
||||
prompt: 'The following is an epic science fiction masterpiece that is immortalized, with delicate descriptions and grand depictions of interstellar civilization wars.\nChapter 1.\n',
|
||||
params: {
|
||||
maxResponseToken: 4100,
|
||||
temperature: 1,
|
||||
topP: 0.5,
|
||||
presencePenalty: 0.4,
|
||||
frequencyPenalty: 0.4,
|
||||
stop: ''
|
||||
}
|
||||
}, {
|
||||
name: 'Translator',
|
||||
prompt: '',
|
||||
params: {
|
||||
maxResponseToken: 4100,
|
||||
temperature: 1,
|
||||
topP: 0.5,
|
||||
presencePenalty: 0.4,
|
||||
frequencyPenalty: 0.4,
|
||||
stop: ''
|
||||
}
|
||||
}, {
|
||||
name: 'Catgirl',
|
||||
prompt: '',
|
||||
params: {
|
||||
maxResponseToken: 4100,
|
||||
temperature: 1,
|
||||
topP: 0.5,
|
||||
presencePenalty: 0.4,
|
||||
frequencyPenalty: 0.4,
|
||||
stop: ''
|
||||
}
|
||||
}, {
|
||||
name: 'Explain Code',
|
||||
prompt: '',
|
||||
params: {
|
||||
maxResponseToken: 4100,
|
||||
temperature: 1,
|
||||
topP: 0.5,
|
||||
presencePenalty: 0.4,
|
||||
frequencyPenalty: 0.4,
|
||||
stop: ''
|
||||
}
|
||||
}, {
|
||||
name: 'Werewolf',
|
||||
prompt: '',
|
||||
params: {
|
||||
maxResponseToken: 4100,
|
||||
temperature: 1,
|
||||
topP: 0.5,
|
||||
presencePenalty: 0.4,
|
||||
frequencyPenalty: 0.4,
|
||||
stop: ''
|
||||
}
|
||||
}, {
|
||||
name: 'Blank',
|
||||
prompt: '',
|
||||
params: {
|
||||
maxResponseToken: 4100,
|
||||
temperature: 1,
|
||||
topP: 0.5,
|
||||
presencePenalty: 0.4,
|
||||
frequencyPenalty: 0.4,
|
||||
stop: ''
|
||||
}
|
||||
}];
|
||||
|
||||
const CompletionPanel: FC = observer(() => {
|
||||
const { t } = useTranslation();
|
||||
const inputRef = useRef<HTMLTextAreaElement>(null);
|
||||
const port = commonStore.getCurrentModelConfig().apiParameters.apiPort;
|
||||
const sseControllerRef = useRef<AbortController | null>(null);
|
||||
|
||||
const scrollToBottom = () => {
|
||||
if (inputRef.current)
|
||||
inputRef.current.scrollTop = inputRef.current.scrollHeight;
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (inputRef.current)
|
||||
inputRef.current.style.height = '100%';
|
||||
scrollToBottom();
|
||||
}, []);
|
||||
|
||||
const setPreset = (preset: CompletionPreset) => {
|
||||
commonStore.setCompletionPreset({
|
||||
...preset,
|
||||
prompt: t(preset.prompt)
|
||||
});
|
||||
};
|
||||
|
||||
if (!commonStore.completionPreset)
|
||||
setPreset(defaultPresets[0]);
|
||||
|
||||
const name = commonStore.completionPreset!.name;
|
||||
|
||||
const prompt = commonStore.completionPreset!.prompt;
|
||||
const setPrompt = (prompt: string) => {
|
||||
commonStore.setCompletionPreset({
|
||||
...commonStore.completionPreset!,
|
||||
prompt
|
||||
});
|
||||
};
|
||||
|
||||
const params = commonStore.completionPreset!.params;
|
||||
const setParams = (newParams: Partial<CompletionParams>) => {
|
||||
commonStore.setCompletionPreset({
|
||||
...commonStore.completionPreset!,
|
||||
params: {
|
||||
...commonStore.completionPreset!.params,
|
||||
...newParams
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const onSubmit = (prompt: string) => {
|
||||
if (commonStore.status.modelStatus === ModelStatus.Offline) {
|
||||
toast(t('Please click the button in the top right corner to start the model'), { type: 'warning' });
|
||||
commonStore.setCompletionGenerating(false);
|
||||
return;
|
||||
}
|
||||
|
||||
let answer = '';
|
||||
sseControllerRef.current = new AbortController();
|
||||
fetchEventSource(`http://127.0.0.1:${port}/completions`, // https://api.openai.com/v1/completions || http://127.0.0.1:${port}/completions
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer sk-`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
prompt,
|
||||
stream: true,
|
||||
model: 'text-davinci-003',
|
||||
max_tokens: params.maxResponseToken,
|
||||
temperature: params.temperature,
|
||||
top_p: params.topP,
|
||||
presence_penalty: params.presencePenalty,
|
||||
frequency_penalty: params.frequencyPenalty,
|
||||
stop: params.stop || undefined
|
||||
}),
|
||||
signal: sseControllerRef.current?.signal,
|
||||
onmessage(e) {
|
||||
console.log('sse message', e);
|
||||
scrollToBottom();
|
||||
if (e.data === '[DONE]') {
|
||||
commonStore.setCompletionGenerating(false);
|
||||
return;
|
||||
}
|
||||
let data;
|
||||
try {
|
||||
data = JSON.parse(e.data);
|
||||
} catch (error) {
|
||||
console.debug('json error', error);
|
||||
return;
|
||||
}
|
||||
if (data.choices && Array.isArray(data.choices) && data.choices.length > 0) {
|
||||
answer += data.choices[0].text;
|
||||
setPrompt(prompt + answer);
|
||||
}
|
||||
},
|
||||
onclose() {
|
||||
console.log('Connection closed');
|
||||
},
|
||||
onerror(err) {
|
||||
commonStore.setCompletionGenerating(false);
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex flex-col sm:flex-row gap-2 overflow-hidden grow">
|
||||
<Textarea
|
||||
ref={inputRef}
|
||||
className="grow"
|
||||
value={prompt}
|
||||
onChange={(e) => setPrompt(e.target.value)}
|
||||
/>
|
||||
<div className="flex flex-col gap-1 max-h-48 sm:max-w-sm sm:max-h-full">
|
||||
<Dropdown style={{ minWidth: 0 }}
|
||||
value={t(commonStore.completionPreset!.name)!}
|
||||
selectedOptions={[commonStore.completionPreset!.name]}
|
||||
onOptionSelect={(_, data) => {
|
||||
if (data.optionValue) {
|
||||
setPreset(defaultPresets.find((preset) => preset.name === data.optionValue)!);
|
||||
}
|
||||
}}>
|
||||
{
|
||||
defaultPresets.map((preset) =>
|
||||
<Option key={preset.name} value={preset.name}>{t(preset.name)!}</Option>)
|
||||
}
|
||||
</Dropdown>
|
||||
<div className="flex flex-col gap-1 overflow-x-hidden overflow-y-auto">
|
||||
<Labeled flex breakline label={t('Max Response Token')}
|
||||
desc={t('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.')}
|
||||
content={
|
||||
<ValuedSlider value={params.maxResponseToken} min={100} max={8100}
|
||||
step={400}
|
||||
input
|
||||
onChange={(e, data) => {
|
||||
setParams({
|
||||
maxResponseToken: data.value
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled flex breakline label={t('Temperature')}
|
||||
desc={t('Sampling temperature, the higher the stronger the randomness and creativity, while the lower, the more focused and deterministic it will be.')}
|
||||
content={
|
||||
<ValuedSlider value={params.temperature} min={0} max={2} step={0.1}
|
||||
input
|
||||
onChange={(e, data) => {
|
||||
setParams({
|
||||
temperature: data.value
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled flex breakline label={t('Top_P')}
|
||||
desc={t('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.')}
|
||||
content={
|
||||
<ValuedSlider value={params.topP} min={0} max={1} step={0.1} input
|
||||
onChange={(e, data) => {
|
||||
setParams({
|
||||
topP: data.value
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled flex breakline label={t('Presence Penalty')}
|
||||
desc={t('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.')}
|
||||
content={
|
||||
<ValuedSlider value={params.presencePenalty} min={-2} max={2}
|
||||
step={0.1} input
|
||||
onChange={(e, data) => {
|
||||
setParams({
|
||||
presencePenalty: data.value
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled flex breakline label={t('Frequency Penalty')}
|
||||
desc={t('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.')}
|
||||
content={
|
||||
<ValuedSlider value={params.frequencyPenalty} min={-2} max={2}
|
||||
step={0.1} input
|
||||
onChange={(e, data) => {
|
||||
setParams({
|
||||
frequencyPenalty: data.value
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled flex breakline label={t('Stop Sequences')}
|
||||
desc={t('When this content appears in the response result, the generation will end.')}
|
||||
content={
|
||||
<Input value={params.stop}
|
||||
onChange={(e, data) => {
|
||||
setParams({
|
||||
stop: data.value
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
</div>
|
||||
<div className="grow" />
|
||||
<div className="flex justify-between gap-2">
|
||||
<Button className="grow" onClick={() => {
|
||||
setPreset(defaultPresets.find((preset) => preset.name === name)!);
|
||||
}}>{t('Reset')}</Button>
|
||||
<Button className="grow" appearance="primary" onClick={() => {
|
||||
if (commonStore.completionGenerating) {
|
||||
sseControllerRef.current?.abort();
|
||||
commonStore.setCompletionGenerating(false);
|
||||
} else {
|
||||
commonStore.setCompletionGenerating(true);
|
||||
onSubmit(prompt);
|
||||
}
|
||||
}}>{!commonStore.completionGenerating ? t('Generate') : t('Stop')}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export const Completion: FC = observer(() => {
|
||||
return (
|
||||
<div className="flex flex-col gap-1 p-2 h-full overflow-hidden">
|
||||
<WorkHeader />
|
||||
<CompletionPanel />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
@@ -643,7 +643,7 @@ export const Configs: FC = observer(() => {
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled label={t('Max Response Token *')}
|
||||
<Labeled label={t('Max Response Token') + ' *'}
|
||||
desc={t('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.')}
|
||||
content={
|
||||
<ValuedSlider value={selectedConfig.apiParameters.maxResponseToken} min={100} max={8100}
|
||||
@@ -655,7 +655,7 @@ export const Configs: FC = observer(() => {
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled label={t('Temperature *')}
|
||||
<Labeled label={t('Temperature') + ' *'}
|
||||
desc={t('Sampling temperature, the higher the stronger the randomness and creativity, while the lower, the more focused and deterministic it will be.')}
|
||||
content={
|
||||
<ValuedSlider value={selectedConfig.apiParameters.temperature} min={0} max={2} step={0.1}
|
||||
@@ -666,7 +666,7 @@ export const Configs: FC = observer(() => {
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled label={t('Top_P *')}
|
||||
<Labeled label={t('Top_P') + ' *'}
|
||||
desc={t('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.')}
|
||||
content={
|
||||
<ValuedSlider value={selectedConfig.apiParameters.topP} min={0} max={1} step={0.1} input
|
||||
@@ -676,7 +676,7 @@ export const Configs: FC = observer(() => {
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled label={t('Presence Penalty *')}
|
||||
<Labeled label={t('Presence Penalty') + ' *'}
|
||||
desc={t('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.')}
|
||||
content={
|
||||
<ValuedSlider value={selectedConfig.apiParameters.presencePenalty} min={-2} max={2}
|
||||
@@ -687,7 +687,7 @@ export const Configs: FC = observer(() => {
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
<Labeled label={t('Frequency Penalty *')}
|
||||
<Labeled label={t('Frequency Penalty') + ' *'}
|
||||
desc={t('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.')}
|
||||
content={
|
||||
<ValuedSlider value={selectedConfig.apiParameters.frequencyPenalty} min={-2} max={2}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FC } from 'react';
|
||||
import { Page } from '../components/Page';
|
||||
import { Dropdown, Option, Switch } from '@fluentui/react-components';
|
||||
import { Dropdown, Input, Option, Switch } from '@fluentui/react-components';
|
||||
import { Labeled } from '../components/Labeled';
|
||||
import commonStore from '../stores/commonStore';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
@@ -20,6 +20,7 @@ export type SettingsType = {
|
||||
autoUpdatesCheck: boolean
|
||||
giteeUpdatesSource: boolean
|
||||
cnMirror: boolean
|
||||
host: string
|
||||
}
|
||||
|
||||
export const Settings: FC = observer(() => {
|
||||
@@ -87,6 +88,14 @@ export const Settings: FC = observer(() => {
|
||||
}} />
|
||||
} />
|
||||
}
|
||||
<Labeled label={t('API Host')} flex spaceBetween content={
|
||||
<Input value={commonStore.settings.host}
|
||||
onChange={(e, data) => {
|
||||
commonStore.setSettings({
|
||||
host: data.value
|
||||
});
|
||||
}} />
|
||||
} />
|
||||
</div>
|
||||
} />
|
||||
);
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Configs } from './Configs';
|
||||
import {
|
||||
ArrowDownload20Regular,
|
||||
Chat20Regular,
|
||||
ClipboardEdit20Regular,
|
||||
DataUsageSettings20Regular,
|
||||
DocumentSettings20Regular,
|
||||
Home20Regular,
|
||||
@@ -17,6 +18,7 @@ import { Train } from './Train';
|
||||
import { Settings } from './Settings';
|
||||
import { About } from './About';
|
||||
import { Downloads } from './Downloads';
|
||||
import { Completion } from './Completion';
|
||||
|
||||
type NavigationItem = {
|
||||
label: string;
|
||||
@@ -41,6 +43,13 @@ export const pages: NavigationItem[] = [
|
||||
element: <Chat />,
|
||||
top: true
|
||||
},
|
||||
{
|
||||
label: 'Completion',
|
||||
path: '/completion',
|
||||
icon: <ClipboardEdit20Regular />,
|
||||
element: <Completion />,
|
||||
top: true
|
||||
},
|
||||
{
|
||||
label: 'Configs',
|
||||
path: '/configs',
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
import commonStore from './stores/commonStore';
|
||||
import { ReadJson } from '../wailsjs/go/backend_golang/App';
|
||||
import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshModels, saveCache } from './utils';
|
||||
import { FileExists, ReadJson } from '../wailsjs/go/backend_golang/App';
|
||||
import {
|
||||
Cache,
|
||||
checkUpdate,
|
||||
deleteDynamicProgramFiles,
|
||||
downloadProgramFiles,
|
||||
LocalConfig,
|
||||
refreshModels,
|
||||
saveCache
|
||||
} from './utils';
|
||||
import { getStatus } from './apis';
|
||||
import { EventsOn } from '../wailsjs/runtime';
|
||||
import { defaultModelConfigs } from './pages/Configs';
|
||||
|
||||
export async function startup() {
|
||||
downloadProgramFiles();
|
||||
FileExists('cache.json').then((exists) => {
|
||||
if (exists)
|
||||
downloadProgramFiles();
|
||||
else {
|
||||
deleteDynamicProgramFiles().then(downloadProgramFiles);
|
||||
}
|
||||
});
|
||||
EventsOn('downloadList', (data) => {
|
||||
if (data)
|
||||
commonStore.setDownloadList(data);
|
||||
|
||||
@@ -10,6 +10,7 @@ import { SettingsType } from '../pages/Settings';
|
||||
import { IntroductionContent } from '../pages/Home';
|
||||
import { AboutContent } from '../pages/About';
|
||||
import i18n from 'i18next';
|
||||
import { CompletionPreset } from '../pages/Completion';
|
||||
|
||||
export enum ModelStatus {
|
||||
Offline,
|
||||
@@ -37,6 +38,9 @@ class CommonStore {
|
||||
// chat
|
||||
conversations: Conversations = {};
|
||||
conversationsOrder: string[] = [];
|
||||
// completion
|
||||
completionPreset: CompletionPreset | null = null;
|
||||
completionGenerating: boolean = false;
|
||||
// configs
|
||||
currentModelConfigIndex: number = 0;
|
||||
modelConfigs: ModelConfig[] = [];
|
||||
@@ -51,7 +55,8 @@ class CommonStore {
|
||||
darkMode: !isSystemLightMode(),
|
||||
autoUpdatesCheck: true,
|
||||
giteeUpdatesSource: getUserLanguage() === 'zh',
|
||||
cnMirror: getUserLanguage() === 'zh'
|
||||
cnMirror: getUserLanguage() === 'zh',
|
||||
host: '127.0.0.1'
|
||||
};
|
||||
// about
|
||||
about: AboutContent = manifest.about;
|
||||
@@ -155,6 +160,14 @@ class CommonStore {
|
||||
setConversationsOrder = (value: string[]) => {
|
||||
this.conversationsOrder = value;
|
||||
};
|
||||
|
||||
setCompletionPreset(value: CompletionPreset) {
|
||||
this.completionPreset = value;
|
||||
}
|
||||
|
||||
setCompletionGenerating(value: boolean) {
|
||||
this.completionGenerating = value;
|
||||
}
|
||||
}
|
||||
|
||||
export default new CommonStore();
|
||||
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
AddToDownloadList,
|
||||
DeleteFile,
|
||||
DownloadFile,
|
||||
FileExists,
|
||||
ListDirFiles,
|
||||
ReadJson,
|
||||
@@ -178,22 +177,24 @@ export function downloadProgramFiles() {
|
||||
manifest.programFiles.forEach(({ url, path }) => {
|
||||
FileExists(path).then(exists => {
|
||||
if (!exists)
|
||||
AddToDownloadList(path, url);
|
||||
AddToDownloadList(path, url.replace('@master', '@v' + manifest.version));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function forceDownloadProgramFiles() {
|
||||
manifest.programFiles.forEach(({ url, path }) => {
|
||||
DownloadFile(path, url);
|
||||
AddToDownloadList(path, url.replace('@master', '@v' + manifest.version));
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteDynamicProgramFiles() {
|
||||
DeleteFile('cache.json');
|
||||
export async function deleteDynamicProgramFiles() {
|
||||
let promises: Promise<void>[] = [];
|
||||
manifest.programFiles.forEach(({ path }) => {
|
||||
if ((path.endsWith('.py') && !path.includes('get-pip.py')) || path.includes('requirements'))
|
||||
DeleteFile(path);
|
||||
if ((path.endsWith('.py') && !path.includes('get-pip.py')) || path.includes('requirements') || path.endsWith('.pyd'))
|
||||
promises.push(DeleteFile(path));
|
||||
});
|
||||
return await Promise.allSettled(promises).catch(() => {
|
||||
});
|
||||
}
|
||||
|
||||
@@ -224,15 +225,15 @@ export async function checkUpdate(notifyEvenLatest: boolean = false) {
|
||||
`https://github.com/josStorer/RWKV-Runner/releases/download/${versionTag}/RWKV-Runner_windows_x64.exe` :
|
||||
`https://gitee.com/josc146/RWKV-Runner/releases/download/${versionTag}/RWKV-Runner_windows_x64.exe`;
|
||||
toastWithButton(t('New Version Available') + ': ' + versionTag, t('Update'), () => {
|
||||
deleteDynamicProgramFiles();
|
||||
DeleteFile('cache.json');
|
||||
toast(t('Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.'), {
|
||||
type: 'info',
|
||||
position: 'bottom-left',
|
||||
autoClose: 6000
|
||||
autoClose: 10000
|
||||
});
|
||||
setTimeout(() => {
|
||||
UpdateApp(updateUrl).catch((e) => {
|
||||
toast(t('Update Error, Please restart this program') + ' - ' + e.message || e, {
|
||||
toast(t('Update Error') + ' - ' + e.message || e, {
|
||||
type: 'error',
|
||||
position: 'bottom-left',
|
||||
autoClose: false
|
||||
@@ -283,7 +284,7 @@ export function toastWithButton(text: string, buttonText: string, onClickButton:
|
||||
}
|
||||
|
||||
export function getSupportedCustomCudaFile() {
|
||||
if ([' 10', ' 20', ' 30'].some(v => commonStore.status.device_name.includes(v)))
|
||||
if ([' 10', ' 16', ' 20', ' 30'].some(v => commonStore.status.device_name.includes(v)))
|
||||
return './backend-python/wkv_cuda_utils/wkv_cuda10_30.pyd';
|
||||
else if ([' 40'].some(v => commonStore.status.device_name.includes(v)))
|
||||
return './backend-python/wkv_cuda_utils/wkv_cuda40.pyd';
|
||||
|
||||
2
frontend/wailsjs/go/backend_golang/App.d.ts
vendored
2
frontend/wailsjs/go/backend_golang/App.d.ts
vendored
@@ -34,6 +34,6 @@ export function ReadJson(arg1:string):Promise<any>;
|
||||
|
||||
export function SaveJson(arg1:string,arg2:any):Promise<void>;
|
||||
|
||||
export function StartServer(arg1:number):Promise<string>;
|
||||
export function StartServer(arg1:number,arg2:string):Promise<string>;
|
||||
|
||||
export function UpdateApp(arg1:string):Promise<boolean>;
|
||||
|
||||
@@ -66,8 +66,8 @@ export function SaveJson(arg1, arg2) {
|
||||
return window['go']['backend_golang']['App']['SaveJson'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function StartServer(arg1) {
|
||||
return window['go']['backend_golang']['App']['StartServer'](arg1);
|
||||
export function StartServer(arg1, arg2) {
|
||||
return window['go']['backend_golang']['App']['StartServer'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function UpdateApp(arg1) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.7",
|
||||
"introduction": {
|
||||
"en": "RWKV is an open-source, commercially usable large language model with high flexibility and great potential for development.\n### About This Tool\nThis tool aims to lower the barrier of entry for using large language models, making it accessible to everyone. It provides fully automated dependency and model management. You simply need to click and run, following the instructions, to deploy a local large language model. The tool itself is very compact and only requires a single executable file for one-click deployment.\nAdditionally, this tool offers an interface that is fully compatible with the OpenAI API. This means you can use any ChatGPT client as a client for RWKV, enabling capability expansion beyond just chat functionality.\n### Preset Configuration Rules at the Bottom\nThis tool comes with a series of preset configurations to reduce complexity. The naming rules for each configuration represent the following in order: device - required VRAM/memory - model size - model language.\nFor example, \"GPU-8G-3B-EN\" indicates that this configuration is for a graphics card with 8GB of VRAM, a model size of 3 billion parameters, and it uses an English language model.\nLarger model sizes have higher performance and VRAM requirements. Among configurations with the same model size, those with higher VRAM usage will have faster runtime.\nFor example, if you have 12GB of VRAM but running the \"GPU-12G-7B-EN\" configuration is slow, you can downgrade to \"GPU-8G-3B-EN\" for a significant speed improvement.\n### About RWKV\nRWKV is an RNN with Transformer-level LLM performance, which can also be directly trained like a GPT transformer (parallelizable). And it's 100% attention-free. You only need the hidden state at position t to compute the state at position t+1. You can use the \"GPT\" mode to quickly compute the hidden state for the \"RNN\" mode.<br/>So it's combining the best of RNN and transformer - great performance, fast inference, saves VRAM, fast training, \"infinite\" ctx_len, and free sentence embedding (using the final hidden state).",
|
||||
"zh": "RWKV是一个开源且允许商用的大语言模型,灵活性很高且极具发展潜力。\n### 关于本工具\n本工具旨在降低大语言模型的使用门槛,做到人人可用,本工具提供了全自动化的依赖和模型管理,你只需要直接点击运行,跟随引导,即可完成本地大语言模型的部署,工具本身体积极小,只需要一个exe即可完成一键部署。\n此外,本工具提供了与OpenAI API完全兼容的接口,这意味着你可以把任意ChatGPT客户端用作RWKV的客户端,实现能力拓展,而不局限于聊天。\n### 底部的预设配置规则\n本工具内置了一系列预设配置,以降低使用难度,每个配置名的规则,依次代表着:设备-所需显存/内存-模型规模-模型语言。\n例如,GPU-8G-3B-CN,表示该配置用于显卡,需要8G显存,模型规模为30亿参数,使用的是中文模型。\n模型规模越大,性能要求越高,显存要求也越高,而同样模型规模的配置中,显存占用越高的,运行速度越快。\n例如当你有12G显存,但运行GPU-12G-7B-CN配置速度比较慢,可降级成GPU-8G-3B-CN,将会大幅提速。\n### 关于RWKV\nRWKV是具有Transformer级别LLM性能的RNN,也可以像GPT Transformer一样直接进行训练(可并行化)。而且它是100% attention-free的。你只需在位置t处获得隐藏状态即可计算位置t + 1处的状态。你可以使用“GPT”模式快速计算用于“RNN”模式的隐藏状态。\n因此,它将RNN和Transformer的优点结合起来 - 高性能、快速推理、节省显存、快速训练、“无限”上下文长度以及免费的语句嵌入(使用最终隐藏状态)。"
|
||||
|
||||
Reference in New Issue
Block a user