@@ -13,16 +13,16 @@ import { languages } from 'countries-list'
13
13
* @type {Object.<string,Model> }
14
14
*/
15
15
export const Models = {
16
- chatgptFree : { value : 'text-davinci-002-render-sha' , desc : 'ChatGPT (Web)' } ,
17
- chatgptPlus : { value : 'gpt-4' , desc : 'ChatGPT (Web, GPT-4)' } ,
16
+ chatgptFree35 : { value : 'text-davinci-002-render-sha' , desc : 'ChatGPT (Web)' } ,
17
+ chatgptPlus4 : { value : 'gpt-4' , desc : 'ChatGPT (Web, GPT-4)' } ,
18
18
chatgptApi35 : { value : 'gpt-3.5-turbo' , desc : 'ChatGPT (GPT-3.5-turbo)' } ,
19
19
chatgptApi4_8k : { value : 'gpt-4' , desc : 'ChatGPT (GPT-4-8k)' } ,
20
20
chatgptApi4_32k : { value : 'gpt-4-32k' , desc : 'ChatGPT (GPT-4-32k)' } ,
21
21
gptApiDavinci : { value : 'text-davinci-003' , desc : 'GPT-3.5' } ,
22
22
}
23
23
24
- export const chatgptWebModelKeys = [ 'chatgptFree ' , 'chatgptPlus ' ]
25
- export const gptApiModelKeys = [ 'gptDavinci ' ]
24
+ export const chatgptWebModelKeys = [ 'chatgptFree35 ' , 'chatgptPlus4 ' ]
25
+ export const gptApiModelKeys = [ 'gptApiDavinci ' ]
26
26
export const chatgptApiModelKeys = [ 'chatgptApi35' , 'chatgptApi4_8k' , 'chatgptApi4_32k' ]
27
27
28
28
export const TriggerMode = {
@@ -52,7 +52,7 @@ export const defaultConfig = {
52
52
/** @type {keyof ThemeMode }*/
53
53
themeMode : 'auto' ,
54
54
/** @type {keyof Models }*/
55
- modelName : 'chatgptFree ' ,
55
+ modelName : 'chatgptFree35 ' ,
56
56
apiKey : '' ,
57
57
preferredLanguage : navigator . language . substring ( 0 , 2 ) ,
58
58
insertAtTop : isMobile ( ) ,
@@ -116,6 +116,12 @@ export function isUsingApiKey(config) {
116
116
*/
117
117
export async function getUserConfig ( ) {
118
118
const options = await Browser . storage . local . get ( Object . keys ( defaultConfig ) )
119
+
120
+ // version compatibility
121
+ if ( options . modelName === 'chatgptFree' ) options . modelName = 'chatgptFree35'
122
+ else if ( options . modelName === 'chatgptApi' ) options . modelName = 'chatgptApi35'
123
+ else if ( options . modelName === 'gptDavinci' ) options . modelName = 'gptApiDavinci'
124
+
119
125
return defaults ( options , defaultConfig )
120
126
}
121
127
0 commit comments