Merge branch 'v2' of github.com:ikechan8370/chatgpt-plugin into v2

This commit is contained in:
ikechan8370 2023-04-16 13:05:31 +08:00
commit b66592d2fb
2 changed files with 8 additions and 3 deletions

View file

@ -35,6 +35,7 @@
* 支持新[必应](https://www.bing.com/new)token负载均衡限流降级
* 2023-03-15 API3支持GPT-4尝鲜需要Plus用户
* 支持[ChatGLM](https://github.com/THUDM/ChatGLM-6B)模型。基于[自建API](https://github.com/ikechan8370/SimpleChatGLM6BAPI)
* 2023-04-15 支持[Claude by Slack](https://www.anthropic.com/claude-in-slack )和PoeWIP。Cloude配置参考[这里](https://ikechan8370.com/archives/chatgpt-plugin-for-yunzaipei-zhi-slack-claude)
### 如果觉得这个插件有趣或者对你有帮助请点一个star吧

View file

@ -559,8 +559,12 @@ export class chatgpt extends plugin {
let me = mm.get(Bot.uin)
let card = me.card
let nickname = me.nickname
prompt = prompt.replace(`@${card}`, '').trim()
prompt = prompt.replace(`@${nickname}`, '').trim()
if (card) {
prompt = prompt.replace(`@${card}`, '').trim()
}
if (nickname) {
prompt = prompt.replace(`@${nickname}`, '').trim()
}
}
} else {
let ats = e.message.filter(m => m.type === 'at')
@ -718,7 +722,7 @@ export class chatgpt extends plugin {
num: 0
}
}
} else if (use !== 'poe' && use === 'claude') {
} else if (use !== 'poe' && use !== 'claude') {
switch (use) {
case 'api': {
key = `CHATGPT:CONVERSATIONS:${e.sender.user_id}`