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 _password: string
|
||||
|
||||
protected _model: string
|
||||
protected _isProAccount: boolean
|
||||
|
||||
protected _executablePath: string
|
||||
|
@ -49,6 +50,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
|
|||
constructor(opts: {
|
||||
email: string
|
||||
password: string
|
||||
model: string
|
||||
|
||||
/** @defaultValue `false` **/
|
||||
isProAccount?: boolean
|
||||
|
@ -88,6 +90,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
|
|||
const {
|
||||
email,
|
||||
password,
|
||||
model,
|
||||
isProAccount = false,
|
||||
markdown = true,
|
||||
debug = false,
|
||||
|
@ -103,6 +106,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
|
|||
|
||||
this._email = email
|
||||
this._password = password
|
||||
this._model = model
|
||||
this._isProAccount = isProAccount
|
||||
this._markdown = !!markdown
|
||||
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',
|
||||
: 'text-davinci-002-render-sha',
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue