2022-12-09 00:01:49 +08:00
|
|
|
|
import logging
|
|
|
|
|
|
2022-12-08 14:54:17 +08:00
|
|
|
|
# Mirai的配置
|
|
|
|
|
# 请到配置mirai的步骤中的教程查看每个字段的信息
|
|
|
|
|
# host: 运行mirai的主机地址
|
|
|
|
|
# port: 运行mirai的主机端口
|
|
|
|
|
# verifyKey: mirai-api-http的verifyKey
|
|
|
|
|
# qq: 机器人的QQ号
|
2022-12-07 16:48:32 +08:00
|
|
|
|
mirai_http_api_config = {
|
|
|
|
|
"host": "",
|
2022-12-08 12:06:04 +08:00
|
|
|
|
"port": 8080,
|
2022-12-07 16:48:32 +08:00
|
|
|
|
"verifyKey": "",
|
|
|
|
|
"qq": 0
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-08 14:54:17 +08:00
|
|
|
|
# MySQL数据库的配置
|
|
|
|
|
# host: 数据库地址
|
|
|
|
|
# port: 数据库端口
|
|
|
|
|
# user: 数据库用户名
|
|
|
|
|
# password: 数据库密码
|
|
|
|
|
# database: 数据库名
|
2022-12-07 16:48:32 +08:00
|
|
|
|
mysql_config = {
|
|
|
|
|
"host": "",
|
|
|
|
|
"port": 3306,
|
|
|
|
|
"user": "",
|
|
|
|
|
"password": "",
|
|
|
|
|
"database": ""
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-08 14:54:17 +08:00
|
|
|
|
# OpenAI的配置
|
|
|
|
|
# api_key: OpenAI的API Key
|
2022-12-07 16:48:32 +08:00
|
|
|
|
openai_config = {
|
|
|
|
|
"api_key": "",
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-08 14:54:17 +08:00
|
|
|
|
# OpenAI的completion API的参数
|
|
|
|
|
# 不了解的话请不要修改,具体请查看OpenAI的文档
|
2022-12-07 16:48:32 +08:00
|
|
|
|
completion_api_params = {
|
2022-12-07 22:27:05 +08:00
|
|
|
|
"model": "text-davinci-003",
|
2022-12-09 15:43:59 +08:00
|
|
|
|
"temperature": 0.8,
|
|
|
|
|
"max_tokens": 200,
|
2022-12-07 22:27:05 +08:00
|
|
|
|
"top_p": 1,
|
2022-12-09 15:43:59 +08:00
|
|
|
|
"frequency_penalty": 0,
|
|
|
|
|
"presence_penalty": 0.6,
|
2022-12-07 22:27:05 +08:00
|
|
|
|
}
|
2022-12-07 22:50:49 +08:00
|
|
|
|
|
2022-12-08 14:54:17 +08:00
|
|
|
|
# 消息处理的超时时间
|
2022-12-09 00:01:49 +08:00
|
|
|
|
process_message_timeout = 20
|
2022-12-07 23:37:52 +08:00
|
|
|
|
|
2022-12-08 14:54:17 +08:00
|
|
|
|
# 消息处理超时重试次数
|
2022-12-07 23:37:52 +08:00
|
|
|
|
retry_times = 3
|
|
|
|
|
|
2022-12-08 14:54:17 +08:00
|
|
|
|
# 每个会话的过期时间
|
2022-12-09 00:01:49 +08:00
|
|
|
|
# 默认值20分钟
|
|
|
|
|
session_expire_time = 60 * 20
|
|
|
|
|
|
|
|
|
|
# 日志级别
|
2022-12-09 15:43:59 +08:00
|
|
|
|
logging_level = logging.INFO
|