mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
feat:指令查看当前部分配置,api流开关
This commit is contained in:
parent
389940085a
commit
a32eb61f84
2 changed files with 61 additions and 13 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
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2276,7 +2278,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