From 383d6de1d65a1fce3bc149874156d28aa36bc99a Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Fri, 17 Mar 2023 00:27:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=A0=E6=AD=A3=E5=B8=B8=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +--- src/app.tsx | 2 +- src/chatbox.tsx | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 33f7698..3123328 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ - 对话记录使用浏览器的 localStorage 保存在本地 - 可删除对话消息 -- 可以设置 system message (如:"你是一个喵娘",参见官方 [API 文档](https://platform.openai.com/docs/guides/chat)) +- 可以设置 system message (如:"你是一个猫娘",参见官方 [API 文档](https://platform.openai.com/docs/guides/chat)) - 可以为不同对话设置不同 APIKEY - 小(整个网页 30k 左右) - 可以设置不同的 API Endpoint(方便墙内人士使用反向代理转发 API 请求) @@ -21,8 +21,6 @@ ![screenshot](./screenshot.webp) -~~让喵娘统治世界吧((发病.webp~~ - ## 使用 以下任意方式都可: diff --git a/src/app.tsx b/src/app.tsx index 7e7a816..6c65bd7 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -20,7 +20,7 @@ export interface ChatStore { const _defaultAPIEndpoint = "https://api.openai.com/v1/chat/completions"; const newChatStore = ( apiKey = "", - systemMessageContent = "你是一个猫娘,你要模仿猫娘的语气说话", + systemMessageContent = "你是一个有用的人工智能助理", apiEndpoint = _defaultAPIEndpoint, streamMode = true ): ChatStore => { diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 582cd0c..0988139 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -164,17 +164,17 @@ export default function ChatBOX(props: {
{!chatStore.apiKey && (

- 喵喵,请先在上方设置 (OPENAI) API KEY + 请先在上方设置 (OPENAI) API KEY

)} {!chatStore.apiEndpoint && (

- 喵喵,请先在上方设置 API Endpoint + 请先在上方设置 API Endpoint

)} {chatStore.history.length === 0 && (

- 这里什么都没有哦 QwQ + 暂无历史对话记录

)} {chatStore.history.map((chat, i) => { @@ -226,7 +226,7 @@ export default function ChatBOX(props: {

{generatingMessage ? generatingMessage.split("\n").map((line) =>

{line}

) - : "生成中,保持网络稳定喵"} + : "生成中,请保持网络稳定"} ...

)}