mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
Merge branch 'ikechan8370:v2' into v2
This commit is contained in:
commit
4a6cad2e4e
6 changed files with 79 additions and 71 deletions
15
utils/bot.js
Normal file
15
utils/bot.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export function getBots () {
|
||||
if (Bot.uin === 88888) {
|
||||
// 找适配器
|
||||
let adapters = Bot.adapter
|
||||
return adapters?.map(uin => Bot[uin])
|
||||
} else if (Bot.adapter && Bot.adapter.length > 0) {
|
||||
let bots = [Bot]
|
||||
Bot.adapter.forEach(uin => {
|
||||
bots.push(Bot[uin])
|
||||
})
|
||||
return bots
|
||||
} else {
|
||||
return [Bot]
|
||||
}
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ export class ClaudeAIClient {
|
|||
attachments,
|
||||
completion: {
|
||||
incremental: true,
|
||||
model: 'claude-2',
|
||||
model: 'claude-2.1',
|
||||
prompt: text,
|
||||
timezone: 'Asia/Hong_Kong'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -848,6 +848,7 @@ export function getMaxModelTokens (model = 'gpt-3.5-turbo') {
|
|||
}
|
||||
|
||||
export function getUin (e) {
|
||||
if (e?.self_id) return e.self_id
|
||||
if (e?.bot?.uin) return e.bot.uin
|
||||
if (Array.isArray(Bot.uin)) {
|
||||
if (Config.trssBotUin && Bot.uin.indexOf(Config.trssBotUin) > -1) { return Config.trssBotUin } else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue