mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-20 11:26:07 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
config.py
|
||||||
@@ -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 = {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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()
|
||||||
Reference in New Issue
Block a user