mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 05:17:10 +00:00
feat: use sqlite instead of lowdb
This commit is contained in:
parent
9c41251164
commit
fd197abb33
22 changed files with 3519 additions and 39 deletions
|
|
@ -40,7 +40,7 @@ export class bym extends plugin {
|
|||
let recall = false
|
||||
let presetId = ChatGPTConfig.bym.defaultPreset
|
||||
if (ChatGPTConfig.bym.presetMap && ChatGPTConfig.bym.presetMap.length > 0) {
|
||||
const option = ChatGPTConfig.bym.presetMap.sort((a, b) => a.priority - b.priority)
|
||||
const option = ChatGPTConfig.bym.presetMap.sort((a, b) => b.priority - a.priority)
|
||||
.find(item => item.keywords.find(keyword => e.msg?.includes(keyword)))
|
||||
if (option) {
|
||||
presetId = option.presetId
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import Config from '../config/config.js'
|
||||
import { Chaite, SendMessageOption } from 'chaite'
|
||||
import { getPreset, intoUserMessage, toYunzai } from '../utils/message.js'
|
||||
import { YunzaiUserState } from '../models/chaite/user_state_storage.js'
|
||||
import { YunzaiUserState } from '../models/chaite/storage/lowdb/user_state_storage.js'
|
||||
import { getGroupContextPrompt, getGroupHistory } from '../utils/group.js'
|
||||
import * as crypto from 'node:crypto'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue