mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 05:17:10 +00:00
fix: 错误过滤非文本消息的问题
This commit is contained in:
parent
1911e5ca4b
commit
afa456f044
2 changed files with 6 additions and 3 deletions
|
|
@ -2,8 +2,8 @@ import { Config } from '../utils/config.js'
|
|||
import { getChatHistoryGroup } from '../utils/chat.js'
|
||||
import { convertFaces } from '../utils/face.js'
|
||||
import { customSplitRegex, filterResponseChunk } from '../utils/text.js'
|
||||
import core, {roleMap} from '../model/core.js'
|
||||
import {formatDate} from '../utils/common.js'
|
||||
import core, { roleMap } from '../model/core.js'
|
||||
import { formatDate } from '../utils/common.js'
|
||||
|
||||
export class bym extends plugin {
|
||||
constructor () {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,12 @@
|
|||
* @param msg
|
||||
*/
|
||||
export function filterResponseChunk (msg) {
|
||||
if (!msg || typeof msg !== 'string') {
|
||||
if (!msg) {
|
||||
return false
|
||||
}
|
||||
if (typeof msg !== 'string') {
|
||||
return msg
|
||||
}
|
||||
if (!msg.trim()) {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue