From a4b762586c707b8b91862f5a42ffca54c29e4000 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sun, 26 Mar 2023 14:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E5=A5=BD=E7=9A=84=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=92=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 18 ++++++++++++++++-- src/chatbox.tsx | 11 +++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92bbfad..1d3ed40 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ > 前排提示:滥用 API 或在不支持的地区调用 API 有被封号的风险 +> +> 建议自行搭建代理中转 API 请求,然后更改对话设置中的 API Endpoint 参数使用中转 # ChatGPT API WEB @@ -13,7 +15,13 @@ - API 调用速度更快更稳定 - 对话记录、API 密钥等使用浏览器的 localStorage 保存在本地 - 可删除对话消息 -- 可以设置 system message (如:"你是一个猫娘" 或 "你是一个有用的助理" 或 "将我的话翻译成英语",参见官方 [API 文档](https://platform.openai.com/docs/guides/chat)) +- 可以设置 system message (参见官方 [API 文档](https://platform.openai.com/docs/guides/chat)) 例如: + - > 你是一个有用的有用的人工智能助理 + - > You are a helpful assistant + - > 你是一个专业英语翻译,把我说的话翻译成英语,为了保持通顺连贯可以适当修改内容。 + - > 根据我的描述给出适用于 Stable Diffusion 的 prompt 和 negative prompt,用英文回答,要求尽量长一些。 + - > 根据我的要求撰写并修改商业文案 + - > ~~你是一个猫娘,你要用猫娘的语气说话~~ - 可以为不同对话设置不同 APIKEY - 小(整个网页 30k 左右) - 可以设置不同的 API Endpoint(方便墙内人士使用反向代理转发 API 请求) @@ -30,6 +38,12 @@ - 从 [release](https://github.com/heimoshuiyu/chatgpt-api-web/releases) 下载网页文件,或在 [github pages](https://heimoshuiyu.github.io/chatgpt-api-web/) 按 `ctrl+s` 保存网页,然后双击打开 - 自行编译构建网页 +### 默认参数继承 + +新建会话将会使用 URL 中设置的默认参数。 + +如果 URL 没有设置该参数,则使用 **目前选中的会话** 的参数 + ### 更改默认参数 - `key`: OPENAI API KEY 默认为空 @@ -48,4 +62,4 @@ yarn install yarn build ``` -构建产物在 `dist` 文件夹中 \ No newline at end of file +构建产物在 `dist` 文件夹中 diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 9acafdd..962b74b 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -196,6 +196,17 @@ export default function ChatBOX(props: { ↖点击左上角 NEW 新建对话
⚠回答内容和速度会受到对话历史的影响,因此建议为不相关的问题创建一个单独的对话。 +
+ ⚠所有历史对话与参数储存在浏览器本地 +
+ ⚠详细文档与源代码:{" "} + + github.com/heimoshuiyu/chatgpt-api-web +

)} {chatStore.history.map((_, messageIndex) => (