mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 05:17:10 +00:00
Merge branch 'v2' of https://github.com/ikechan8370/chatgpt-plugin into v2
This commit is contained in:
commit
2c9008ea56
3 changed files with 119 additions and 14 deletions
|
|
@ -134,6 +134,7 @@ const newFetch = (url, options = {}) => {
|
|||
export class chatgpt extends plugin {
|
||||
constructor () {
|
||||
let toggleMode = Config.toggleMode
|
||||
let apiStream = Config.apiStream
|
||||
super({
|
||||
/** 功能名称 */
|
||||
name: 'ChatGpt 对话',
|
||||
|
|
@ -291,6 +292,7 @@ export class chatgpt extends plugin {
|
|||
]
|
||||
})
|
||||
this.toggleMode = toggleMode
|
||||
this.apiStream = apiStream
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2272,7 +2274,7 @@ export class chatgpt extends plugin {
|
|||
let option = {
|
||||
timeoutMs: 600000,
|
||||
completionParams,
|
||||
stream: true,
|
||||
stream: this.apiStream,
|
||||
onProgress: (data) => {
|
||||
if (Config.debug) {
|
||||
logger.info(data?.text || data.functionCall || data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue