gptbot is a Line group chat assistant robot, powered by chatgpt with powerful AI.
go install github.com/jopbrown/gptbot/cmd/gptbot@latest
- The robot can send private message or join chat groups.
- In groups, it can identify messages from different people.
- You can assign different roles to the robot.
- It supports displaying simple images.
To interact with AI in a chat group, must begin your message with '@ai'.
-
Talk to AI in a chat group
@ai
@小愛
@小爱
-
Clear chat session
/refresh
/clear
/clean
/清空
-
Switch role
/cosplay <role>
/扮演 <role>
-
Display all available roles
/cosplay
/扮演
The configuration file must be named gptbot.yaml
and located next to the executable.
ChatGptAccessToken: xxxxxxxxxx
ChatGptModel: gpt-3.5-turbo
ServePort: 8888
Bots:
/linebot:
DefaultRole: 聊天機器人
LineChannelToken: xxxxxxxxx
LineChannelSecret: xxxxxxxxxx
To retrieve environment variables, use the following format:
${env.VARNAME}
.
Add more custom roles
Roles:
Role 1: Role Prompt
Role 2: Role Prompt
Using an unofficial OpenAI API-compatible service.
ChatGptApiUrl: http://your_service_url
# default is https://api.openai.com/v1
Chinese document generated by codesum.