-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
二、项目配置文件配置
Soulter edited this page Sep 15, 2023
·
16 revisions
wiki暂时只写了平台类和模型类的配置文件配置,欢迎pr完善。 本项目目前有两个配置文件。一个是
QQChannelChatGPT/configs/目录下的config.yaml,另一个是cmd_config.json(这个是为了方便动态更新)。
config.yaml
GPT/Bing均要挂梯子才能用
由于众所周知的原因,如果您的机器在国内,那么需要以下要求之一:
- 挂全局代理的梯子
- 挂梯子,然后在配置文件中设置系统代理的端口(Windows挂了梯子后可以在设置里面搜索“代理服务器”然后查看梯子开放的端口)。配置文件中默认将系统代理注释了,需要去掉注释(
#注意#后面的空格也要去掉)。如下:
# 系统代理
http_proxy: http://localhost:7890 # clash是7890,其他的代理软件需要自己找端口。推荐clash
https_proxy: http://localhost:7890 # clash是7890,其他的代理软件需要自己找端口。推荐clashconfig.yaml
需要先行启动go-cqhttp 在
机器人的(不是go-cqhttp)配置文件找到并设置:
# QQ机器人
# enable为true则启用,false则不启用
# 需要安装GO-CQHTTP配合使用。
# 文档:https://docs.go-cqhttp.org/
#
gocqbot:
enable: true腾讯官方推出的SDK,不会出现登录异常等错误。 如果上面的GOCQ用不了(比如报code45、237、278等)可以用这个。这个只支持QQ频道,不支持QQ
在配置文件找到并设置:
# QQ频道机器人
# QQ开放平台的appid和令牌
# 前往https://q.qq.com/ 创建频道机器人和令牌。详细部署教程:https://soulter.top/posts/qpdg.html#%E6%96%B9%E5%BC%8F1%EF%BC%9A%E9%83%A8%E7%BD%B2%E5%88%B0QQ%E9%A2%91%E9%81%93
# enable为true则启用,false则不启用
qqbot:
enable: true
appid: xxxxx #填你的机器人的appid)
token: xxxxx #填你的机器人的令牌config.yaml
目前疑似不可用 在配置文件找到并设置:
# 逆向New Bing
# 需要在项目根目录下创建cookies.json并粘贴cookies进去。
# 详见:https://soulter.top/posts/qpdg.html的 方式2:使用New Bing
rev_edgegpt:
enable: true⚠ 长期可用,并且可用完全免费的key。在本wiki“补充:xxx”页中有提到如何一步获得免费稳定的key。 在配置文件找到并设置:
openai:
key:
- xxxxxxxxxxxxxxxxx #填你的key
api_base: none
# 这里是GPT配置,语言模型默认使用gpt-3.5-turbo
chatGPTConfigs:
model: gpt-3.5-turbo
max_tokens: 3000
temperature: 0.9
top_p: 1
frequency_penalty: 0
presence_penalty: 0
total_tokens_limit: 5000目前疑似不可用 在配置文件找到并设置:
rev_ChatGPT:
enable: true
account:
- access_token: xxxxxxx #填你的账号的access_token(获取:https://chat.openai.com/api/auth/session)
- access_token: xxxxxxx #可以多账号,如果只有一个账号就把这一行删掉就行。可通过llms插件快速使用。详见README
这个不配置也行,是可选项。成功启动项目后会自动生成默认配置模板在项目根目录下。
{
"nick_qq": [
"ai",
"式酱",
"!"
],
"admin_qq": "123456",
"admin_qqchan": "123456789",
"qq_forward_threshold": 200,
"qq_welcome": "\u6b22\u8fce\u52a0\u5165\u672c\u7fa4\uff01\n\u6b22\u8fce\u7ed9https://github.com/Soulter/QQChannelChatGPT\u9879\u76ee\u4e00\u4e2aStar\ud83d\ude0a~\n\u8f93\u5165help\u67e5\u770b\u5e2e\u52a9~\n",
"bing_proxy": "",
"qq_pic_mode": true
}依次往下是:
- 机器人昵称(可做唤醒词使用)
- 管理员QQ号
- 管理员QQ频道用户号(可在频道使用!myid指令查询)
- 回复文本转图片的阈值(默认200字)
- QQ进群欢迎信息
- bing代理地址
- 新版QQ文本转图片模式(markdown渲染,推荐启用)
- 首页
- 文档入口
- Top Level
- community events
- deploy
- dev
- others
- platform
- 接入 OneBot v11 协议实现
- 接入钉钉 DingTalk
- 接入 Discord
- 接入 Kook
- 接入飞书
- 接入 LINE
- 接入 Matrix
- 接入 Mattermost
- 接入 Misskey 平台
- 接入 QQ 官方机器人平台
- 通过 QQ官方机器人 接入 QQ (Webhook)
- 通过 QQ官方机器人 接入 QQ (Websockets)
- 接入 Satori 协议
- 接入 server-satori (基于 Koishi)
- 接入 Slack
- 接入消息平台
- 接入 Telegram
- 接入 VoceChat
- AstrBot 接入企业微信
- 接入企业微信智能机器人平台
- AstrBot 接入微信公众平台
- 接入个人微信
- providers
- use
- Home
- Docs Entry
- Top Level
- config
- deploy
- Deploy AstrBot on 1Panel
- Deploy AstrBot on BT Panel
- Deploy AstrBot on CasaOS
- Deploy AstrBot from Source Code
- Community-Provided Deployment Methods
- Deploy via Compshare
- Deploy with AstrBot Desktop Client
- Deploy AstrBot with Docker
- Deploy AstrBot with Kubernetes
- Deploy AstrBot with AstrBot Launcher
- Other Deployments
- Package Manager Deployment (uv)
- Installation via System Package Manager
- Preface
- dev
- AstrBot Configuration File
- API Scope–Endpoint Reference
- AstrBot HTTP API
- AstrBot Plugin Market JSON Specification
- Developing a Platform Adapter
- plugin
- AI
- Text to Image
- Handling Message Events
- Plugin Configuration
- Plugin Internationalization
- Plugin Pages
- Sending Messages
- Session Control
- Minimal Example
- Plugin Storage
- AstrBot Plugin Development Guide 🌠
- Publishing Plugins to the Plugin Marketplace
- ospp
- others
- platform
- Connect OneBot v11 Protocol Implementations
- Connect to DingTalk
- Connecting to Discord
- Connect to KOOK
- Connecting to Lark
- Connecting to LINE
- Connecting to Matrix
- Connecting to Mattermost
- Connecting to Misskey Platform
- Connect QQ Official Bot
- Connect QQ via QQ Official Bot (Webhook)
- Connect QQ via QQ Official Bot (Websockets)
- Connect to Satori Protocol
- Connect server-satori (Koishi)
- Connecting to Slack
- Messaging Platforms
- Connecting to Telegram
- Connect to VoceChat
- Connect AstrBot to WeCom
- Connect to WeCom AI Bot Platform
- Connect AstrBot to WeChat Official Account Platform
- Connect Personal WeChat
- providers
- Connect 302.AI
- Agent Runners
- Built-in Agent Runner
- Connect to Coze
- Connect to Alibaba Cloud Bailian Application
- Connect to DeerFlow
- Connect to Dify
- Connect AIHubMix
- coze
- dashscope
- dify
- 大语言模型提供商
- NewAPI
- Connect PPIO Cloud
- Connect LM Studio to Use DeepSeek-R1 and Other Models
- Integrating Ollama
- Connect ShengSuanYun
- Connecting to SiliconFlow
- Connecting Model Services
- Connecting to TokenPony
- use
- Agent Runner
- Agent Sandbox Environment ⛵️
- astrbot sandbox
- CLI Commands
- Docker-based Code Interpreter
- Built-in Commands
- Computer Use
- Context Compression
- Custom Rules
- Function Calling
- AstrBot Knowledge Base
- MCP
- AstrBot Star
- Proactive Capabilities
- Anthropic Skills
- Agent Handoff and SubAgent
- Unified Webhook Mode
- Web Search
- WebUI