kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: ChatGPTAPIBrowser support cutom model
rodzic
651c68714f
commit
7d3e815789
|
@ -30,6 +30,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
|
||||||
protected _email: string
|
protected _email: string
|
||||||
protected _password: string
|
protected _password: string
|
||||||
|
|
||||||
|
protected _model: string
|
||||||
protected _isProAccount: boolean
|
protected _isProAccount: boolean
|
||||||
|
|
||||||
protected _executablePath: string
|
protected _executablePath: string
|
||||||
|
@ -49,6 +50,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
|
||||||
constructor(opts: {
|
constructor(opts: {
|
||||||
email: string
|
email: string
|
||||||
password: string
|
password: string
|
||||||
|
model: string
|
||||||
|
|
||||||
/** @defaultValue `false` **/
|
/** @defaultValue `false` **/
|
||||||
isProAccount?: boolean
|
isProAccount?: boolean
|
||||||
|
@ -88,6 +90,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
|
||||||
const {
|
const {
|
||||||
email,
|
email,
|
||||||
password,
|
password,
|
||||||
|
model,
|
||||||
isProAccount = false,
|
isProAccount = false,
|
||||||
markdown = true,
|
markdown = true,
|
||||||
debug = false,
|
debug = false,
|
||||||
|
@ -103,6 +106,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
|
||||||
|
|
||||||
this._email = email
|
this._email = email
|
||||||
this._password = password
|
this._password = password
|
||||||
|
this._model = model
|
||||||
this._isProAccount = isProAccount
|
this._isProAccount = isProAccount
|
||||||
this._markdown = !!markdown
|
this._markdown = !!markdown
|
||||||
this._debug = !!debug
|
this._debug = !!debug
|
||||||
|
@ -464,9 +468,11 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
model: this._isProAccount
|
model: this._model
|
||||||
|
? this._model
|
||||||
|
: this._isProAccount
|
||||||
? 'text-davinci-002-render-paid'
|
? 'text-davinci-002-render-paid'
|
||||||
: 'text-davinci-002-render',
|
: 'text-davinci-002-render-sha',
|
||||||
parent_message_id: parentMessageId
|
parent_message_id: parentMessageId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ export class ChatGPTAPI extends AChatGPTAPI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
model: 'text-davinci-002-render',
|
model: 'text-davinci-002-render-sha',
|
||||||
parent_message_id: parentMessageId
|
parent_message_id: parentMessageId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue