添加贡献者action (#139)

This commit is contained in:
二丫讲梵
2023-03-29 22:44:01 +08:00
committed by GitHub
parent 71a464b7f0
commit 40bca80cc3
3 changed files with 67 additions and 46 deletions

View File

@@ -0,0 +1,16 @@
name: Generate a list of contributors
on:
push:
branches:
- main
jobs:
contrib-readme-en-job:
runs-on: ubuntu-latest
name: A job to automate contrib in readme
steps:
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@v2.3.6
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

View File

@@ -357,3 +357,8 @@ $ go run main.go
> 本项目曾在 | [2022-12-12](https://github.com/bonfy/github-trending/blob/master/2022/2022-12-12.md#go) | [2022-12-18](https://github.com/bonfy/github-trending/blob/master/2022/2022-12-18.md#go) | [2022-12-19](https://github.com/bonfy/github-trending/blob/master/2022/2022-12-19.md#go) | [2022-12-20](https://github.com/bonfy/github-trending/blob/master/2022/2022-12-20.md#go) | [2023-02-09](https://github.com/bonfy/github-trending/blob/master/2023-02-09.md#go) | [2023-02-10](https://github.com/bonfy/github-trending/blob/master/2023-02-10.md#go) | [2023-02-11](https://github.com/bonfy/github-trending/blob/master/2023-02-11.md#go) | [2023-02-12](https://github.com/bonfy/github-trending/blob/master/2023-02-12.md#go) | [2023-02-13](https://github.com/bonfy/github-trending/blob/master/2023-02-13.md#go) | [2023-02-14](https://github.com/bonfy/github-trending/blob/master/2023-02-14.md#go) | [2023-02-15](https://github.com/bonfy/github-trending/blob/master/2023-02-15.md#go) | [2023-03-04](https://github.com/bonfy/github-trending/blob/master/2023-03-04.md#go) | [2023-03-05](https://github.com/bonfy/github-trending/blob/master/2023-03-05.md#go) | [2023-03-19](https://github.com/bonfy/github-trending/blob/master/2023-03-19.md#go) | [2023-03-22](https://github.com/bonfy/github-trending/blob/master/2023-03-22.md#go) | [2023-03-25](https://github.com/bonfy/github-trending/blob/master/2023-03-25.md#go) | [2023-03-26](https://github.com/bonfy/github-trending/blob/master/2023-03-26.md#go), 这些天里登上GitHub Trending。而且还在持续登榜中可见最近openai的热度。
> ![image_20230316_114915](https://cdn.staticaly.com/gh/eryajf/tu/main/img/image_20230316_114915.jpg)
## 贡献者列表
<!-- readme: collaborators,contributors -start -->
<!-- readme: collaborators,contributors -end -->

92
main.go
View File

@@ -19,52 +19,6 @@ func main() {
Start()
}
var Welcome string = `# 发送信息
若您想给机器人发送信息,请选择:
1. 在本机器人所在群里@机器人;
2. 点击机器人的头像后,再点击"发消息"。
机器人收到您的信息后默认会交给chatgpt进行处理。除非您发送的内容是7个**系统指令**之一。
-----
# 系统指令
系统指令是一些特殊的词语,当您向机器人发送这些词语时,会触发对应的功能:
**单聊**:每条消息都是单独的对话,不包含上下文
**串聊**:对话会携带上下文,除非您主动重置对话或对话长度超过限制
**重置**:重置上下文
**余额**查询机器人所用OpenAI账号的余额
**模板**:查询机器人内置的快捷模板
**图片**:查看如何根据提示词生成图片
**帮助**:重新获取帮助信息
-----
# 友情提示
使用"串聊模式"会显著加快机器人所用账号的余额消耗速度。
因此,若无保留上下文的需求,建议使用"单聊模式"。
即使有保留上下文的需求,也应适时使用"重置"指令来重置上下文。
-----
# 项目地址
本项目已在GitHub开源[查看源代码](https://github.com/eryajf/chatgpt-dingtalk)。
`
func Start() {
app := ship.Default()
app.Route("/").POST(func(c *ship.Context) error {
@@ -122,3 +76,49 @@ func Start() {
// 启动服务器
ship.StartServer(port, app)
}
var Welcome string = `# 发送信息
若您想给机器人发送信息,请选择:
1. 在本机器人所在群里@机器人;
2. 点击机器人的头像后,再点击"发消息"。
机器人收到您的信息后默认会交给chatgpt进行处理。除非您发送的内容是7个**系统指令**之一。
-----
# 系统指令
系统指令是一些特殊的词语,当您向机器人发送这些词语时,会触发对应的功能:
**单聊**:每条消息都是单独的对话,不包含上下文
**串聊**:对话会携带上下文,除非您主动重置对话或对话长度超过限制
**重置**:重置上下文
**余额**查询机器人所用OpenAI账号的余额
**模板**:查询机器人内置的快捷模板
**图片**:查看如何根据提示词生成图片
**帮助**:重新获取帮助信息
-----
# 友情提示
使用"串聊模式"会显著加快机器人所用账号的余额消耗速度。
因此,若无保留上下文的需求,建议使用"单聊模式"。
即使有保留上下文的需求,也应适时使用"重置"指令来重置上下文。
-----
# 项目地址
本项目已在GitHub开源[查看源代码](https://github.com/eryajf/chatgpt-dingtalk)。
`