Commit 4bb48262 authored by chenlongde's avatar chenlongde

feat: ChatGPTAPIBrowser support cutom model

parent 168ab1fc
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment