From 82b05b3d94d34c2594038e61be985a3e60a98fea Mon Sep 17 00:00:00 2001 From: archer <545436317@qq.com> Date: Mon, 12 Jun 2023 10:24:12 +0800 Subject: [PATCH] perf: share message --- client/.env.template | 31 +++++++++++++++++++++++++++++++ client/src/pages/chat/share.tsx | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 client/.env.template diff --git a/client/.env.template b/client/.env.template new file mode 100644 index 000000000..54fc1f659 --- /dev/null +++ b/client/.env.template @@ -0,0 +1,31 @@ +# 运行端口,如果不是 3000 口运行,需要改成其他的。注意:不是改了这个变量就会变成其他端口,而是因为改成其他端口,才用这个变量。 +PORT=3000 +# 代理 +# AXIOS_PROXY_HOST=127.0.0.1 +# AXIOS_PROXY_PORT=7890 +# email +MY_MAIL=xxxx@qq.com +MAILE_CODE=xxxx +# ali ems +aliAccessKeyId=xxxx +aliAccessKeySecret=xxxx +aliSignName=xxxx +aliTemplateCode=xxxx +# token +TOKEN_KEY=dfdasfdas +# root key, 最高权限 +ROOT_KEY=fdafasd +# openai +# OPENAI_BASE_URL=http://ai.openai.com/v1 +# OPENAI_BASE_URL_AUTH=可选安全凭证,会放到 header.auth 里 +OPENAIKEY=sk-xxx +OPENAI_TRAINING_KEY=sk-xxx +GPT4KEY=sk-xxx +# db +MONGODB_URI=mongodb://username:password@0.0.0.0:27017/?authSource=admin +MONGODB_NAME=fastgpt +PG_HOST=0.0.0.0 +PG_PORT=8100 +PG_USER=root +PG_PASSWORD=psw +PG_DB_NAME=dbname \ No newline at end of file diff --git a/client/src/pages/chat/share.tsx b/client/src/pages/chat/share.tsx index 6159eecbe..5e949da47 100644 --- a/client/src/pages/chat/share.tsx +++ b/client/src/pages/chat/share.tsx @@ -235,7 +235,8 @@ const Chat = ({ shareId, historyId }: { shareId: string; historyId: string }) => { type: 'shareChatFinish', data: { - responseText + question: formatPrompts[0].value, + answer: responseText } }, '*'