-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
补充:如何开启ChatGPT、Bard、Claude等语言模型?
过时。请看 https://astrbot.soulter.top/center 过时。请看 https://astrbot.soulter.top/center
- OpenAI GPT-3模型(原生支持)
- OpenAI GPT-3.5模型(原生支持)
- OpenAI GPT-4模型(原生支持)
- ChatGPT网页版 GPT-3.5模型(免费,原生支持)
- ChatGPT网页版 GPT-4模型(需订阅Plus账户,原生支持)
- Bing(免费,原生支持)
- Claude模型(免费,由LLMs插件支持)
- HuggingChat模型(免费,由LLMs插件支持)
- Google Bard(免费,由LLMs插件支持)
- 任何与OpenAI ChatGPT接口一致的第三方语言模型服务
至少需要:
- 一个OpenAI账号
- 一个稳定的国外梯子
如果您有OpenAI API Key,可以在QQChannelChatGPT/configs/config.yaml下约86行处找到:
openai:
key:
- 这里填写你的apikey
- 这里填写你的apikey,支持多个key,如果只有一个就把这一行删了
api_base: none
# 这里是GPT配置,语言模型默认使用gpt-3.5-turbo
chatGPTConfigs:
model: gpt-3.5-turbo # 这里可以是gpt-4,前提是你的账号有gpt-4的api权限
max_tokens: 3000
temperature: 0.9
top_p: 1
frequency_penalty: 0
presence_penalty: 0
total_tokens_limit: 5000如果您没有OpenAI API Key,可以在此处获得您OpenAI账号下的session_token,找到session_token那一段,然后复制双引号内的内容:

然后,在QQChannelChatGPT/configs/config.yaml下约132行处找到:
# 支持使用access_token登录
rev_ChatGPT:
enable: true
account:
- access_token: 这里填写你刚刚复制的access_token。
- access_token: 这里填写你刚刚复制的access_token,支持多个,如果只有一个就把这一行删了
注意:默认是gpt-3.5。如果您是Plus账户,想用插件、网页搜索能力和gpt-4,请先确保机器人程序是最新版本(使用update latest r指令更新并重启程序),然后找到并打开cmd_config.json,如果您是最新版本,那么会看到如下四个字段:
"rev_chatgpt_model": "", // 可选。可以填gpt-4-browsing, text-davinci-002-render-sha, gpt-4, gpt-4-plugins,为空时默认是3.5
"rev_chatgpt_plugin_ids": [], // 可选。插件的id。如["plugin-d1d6eb04-3375-40aa-940a-c2fc57ce0f51"]则使用wolfram Alpha
"rev_chatgpt_PUID": "", // 可选。只有当你有Plus账户时必填
"rev_chatgpt_unverified_plugin_domains": [] // 可选。未经验证的插件⚠ 2023/09/29:默认启动已不能正常使用,需要在cmd_config.json修改CHATGPT_BASE_URL的值为自己搭建的 bypass 服务器链接,或者可以使用我自建的,链接详情请加QQ群322154837
当然,你也可以使用完全免费的OpenAI ChatGPT,由 https://github.com/chatanywhere/GPT_API_free 提供支持。 打开这个链接,然后点击申请免费内测,就可以得到一个免费的第三方key,把它复制下来。
在QQChannelChatGPT/configs/config.yaml下约86行处找到:
openai:
key:
- 这里填写刚刚复制的key
api_base: https://api.chatanywhere.com.cn # 无需梯子
chatGPTConfigs:
model: gpt-3.5-turbo # 如果申请的是免费内测key,那么只能用gpt-3.5-turbo
max_tokens: 3000
temperature: 0.9
top_p: 1
frequency_penalty: 0
presence_penalty: 0
total_tokens_limit: 5000如果文件夹下有chatgpt_key_record,将其删除再重启即可。
有经济能力可以支持一下https://github.com/chatanywhere/GPT_API_free 购买低价key,获得更多模型。
Enjoy~
对于Claude,需要美国或者英国的梯子;对于HuggingChat,需要梯子;对于Bard,需要梯子
在聊天区内对机器人发送plugin i https://github.com/Soulter/LLMS来安装LLMs插件,安装完成之后,发送llm查看细节。
如何获取 Claude、Bard 的Cookie? / 如何注册HuggingChat?
- 首页
- 文档入口
- 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