fix: shamrock的小问题

This commit is contained in:
ikechan8370 2023-11-28 14:30:09 +08:00
parent c99019cd91
commit cef2f7378d
2 changed files with 29 additions and 28 deletions

View file

@ -1,7 +1,7 @@
export async function getChatHistoryGroup (e, num) {
//if (e.adapter === 'shamrock') {
// if (e.adapter === 'shamrock') {
// return await e.group.getChatHistory(0, num, false)
//} else {
// } else {
let latestChats = await e.group.getChatHistory(0, 1)
if (latestChats.length > 0) {
let latestChat = latestChats[0]

View file

@ -848,6 +848,7 @@ export function getMaxModelTokens (model = 'gpt-3.5-turbo') {
export function getUin (e) {
if (e?.bot?.uin) return e.bot.uin
if (e?.bot?.self_id) return e.bot.self_id
if (Array.isArray(Bot.uin)) {
if (Config.trssBotUin && Bot.uin.indexOf(Config.trssBotUin) > -1) { return Config.trssBotUin } else {
Bot.uin.forEach((u) => {