From bbffb5ac7db2a134cfe86401dd7eb74740dbced7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E7=A7=8B=E5=AE=9E?= <974568302@qq.com> Date: Thu, 11 May 2023 14:21:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=85=8D=E7=BD=AE=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++++ README.md | 17 +++++++++++++++++ chat.txt | 4 ---- config.json_example | 5 +++++ index.php | 11 +++++++---- js/chat.js | 2 +- log/此文件夹用于存放日志文件.txt | 2 ++ stream.php | 21 +++++++++++++++++---- 8 files changed, 53 insertions(+), 13 deletions(-) create mode 100644 .gitignore delete mode 100644 chat.txt create mode 100644 config.json_example create mode 100644 log/此文件夹用于存放日志文件.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9595c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/log/* +!/log/此文件夹用于存放日志文件.txt +config.json +favicon.ico diff --git a/README.md b/README.md index 4a2ed45..8098de5 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,23 @@ ChatGPT的横空出世真的改变了世界,用过的人都知道ChatGPT完全  +------ +**调整部分内容为配置文件形式优化拉取代码配置信息冲突** +拉取代码后请复制config.json_example 为 config.json +linux下 进入项目目录执行 cp config.json_example config.json + +配置定义如下 +// 控制是否显示私人密钥输入框 +"personalKey": false, +//设置全局密钥 开启私人密钥输入框后此key将不启用 +"key": "sk-replace_with_your_api_key_dude", +//代理服务器未设置则不启用代理示例 http://127.0.0.1 +"proxy": "http://127.0.0.1" + +------ +**log调整每日为单独文件** +**注意请赋予站点修改log文件夹内内容权限** + ------ **本项目常见问题:** diff --git a/chat.txt b/chat.txt deleted file mode 100644 index 7b0db87..0000000 --- a/chat.txt +++ /dev/null @@ -1,4 +0,0 @@ -127.0.0.1 | 2023-03-08 10:37:47 -Q:你好 -A:你好!有什么我可以帮助你的吗? ----------------- diff --git a/config.json_example b/config.json_example new file mode 100644 index 0000000..7c98b5d --- /dev/null +++ b/config.json_example @@ -0,0 +1,5 @@ +{ + "personalKey": false, + "key": "sk-replace_with_your_api_key_dude", + "proxy": "" +} \ No newline at end of file diff --git a/index.php b/index.php index e387627..03c73fa 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,9 @@