Initial commit

This commit is contained in:
Rock Chin
2022-12-07 16:48:32 +08:00
commit 79917c8bb9
3 changed files with 42 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
config.py

22
config-template.py Normal file
View File

@@ -0,0 +1,22 @@
mirai_http_api_config = {
"host": "",
"port": 8080,
"verifyKey": "",
"qq": 0
}
mysql_config = {
"host": "",
"port": 3306,
"user": "",
"password": "",
"database": ""
}
openai_config = {
"api_key": "",
}
completion_api_params = {
}

19
main.py Normal file
View File

@@ -0,0 +1,19 @@
import os
import shutil
def main():
# 检查是否有config.py,如果没有就把config-template.py复制一份,并退出程序
if not os.path.exists('config.py'):
shutil.copy('config-template.py', 'config.py')
print('请先在config.py中填写配置')
return
# 导入config.py
assert os.path.exists('config.py')
import config
print(config.mirai_http_api_config)
if __name__ == '__main__':
main()