mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
feat: 改用SydneyClient更准确地检测token
This commit is contained in:
parent
df4ecc84ab
commit
5b62667839
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import { Config } from '../utils/config.js'
|
|||
import { BingAIClient } from '@waylaidwanderer/chatgpt-api'
|
||||
import { exec } from 'child_process'
|
||||
import { checkPnpm, formatDuration, parseDuration } from '../utils/common.js'
|
||||
import SydneyAIClient from "../utils/SydneyAIClient.js";
|
||||
|
||||
export class ChatgptManagement extends plugin {
|
||||
constructor (e) {
|
||||
|
|
@ -176,7 +177,7 @@ export class ChatgptManagement extends plugin {
|
|||
if (token?.indexOf('=') > -1) {
|
||||
cookie = token
|
||||
}
|
||||
const bingAIClient = new BingAIClient({
|
||||
const bingAIClient = new SydneyAIClient({
|
||||
userToken: token, // "_U" cookie from bing.com
|
||||
cookie,
|
||||
debug: Config.debug
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue