feat: ChatGPTAPIBrowser support cutom model

chatgpt-api-old-v3^2
chenlongde 2023-03-15 11:08:08 +08:00
rodzic 651c68714f
commit 7d3e815789
2 zmienionych plików z 9 dodań i 3 usunięć

Wyświetl plik

@ -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
}

Wyświetl plik

@ -212,7 +212,7 @@ export class ChatGPTAPI extends AChatGPTAPI {
}
}
],
model: 'text-davinci-002-render',
model: 'text-davinci-002-render-sha',
parent_message_id: parentMessageId
}