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..11719f5 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,46 @@ 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" + +//白名单ip数组内的ip加入白名单访问时直接进入内部专用版 + +"homeAddress": [ + + "127.0.0.1" + +], + +//设置可访问用户名和与密码 + +"userList": { + + "admin": "123" + +} + +------ +**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..ca8eee9 --- /dev/null +++ b/config.json_example @@ -0,0 +1,6 @@ +{ + "homeAddress":[]:, + "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..123c64e 100644 --- a/index.php +++ b/index.php @@ -1,26 +1,35 @@