mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: no support cache
This commit is contained in:
parent
90c7c992a6
commit
5ceb9c9de3
3 changed files with 23 additions and 15 deletions
14
apps/chat.js
14
apps/chat.js
|
|
@ -641,9 +641,9 @@ export class chatgpt extends plugin {
|
|||
if (!bingToken) {
|
||||
throw new Error('未绑定Bing Cookie,请使用#chatgpt设置必应token命令绑定Bing Cookie')
|
||||
}
|
||||
let cookie
|
||||
let cookies
|
||||
if (bingToken?.indexOf('=') > -1) {
|
||||
cookie = bingToken
|
||||
cookies = bingToken
|
||||
}
|
||||
let bingAIClient
|
||||
if (Config.toneStyle === 'Sydney') {
|
||||
|
|
@ -653,10 +653,11 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
bingAIClient = new SydneyAIClient({
|
||||
userToken: bingToken, // "_U" cookie from bing.com
|
||||
cookie,
|
||||
cookies,
|
||||
debug: Config.debug,
|
||||
cache: cacheOptions,
|
||||
user: e.sender.user_id
|
||||
user: e.sender.user_id,
|
||||
proxy: Config.proxy
|
||||
})
|
||||
// Sydney不实现上下文传递,删除上下文索引
|
||||
delete conversation.clientId
|
||||
|
|
@ -665,8 +666,9 @@ export class chatgpt extends plugin {
|
|||
} else {
|
||||
bingAIClient = new BingAIClient({
|
||||
userToken: bingToken, // "_U" cookie from bing.com
|
||||
cookie,
|
||||
debug: Config.debug
|
||||
cookies,
|
||||
debug: Config.debug,
|
||||
proxy: Config.proxy
|
||||
})
|
||||
}
|
||||
let response
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue