Skip to content

Commit

Permalink
feat: add gpt3.5-mobile, gpt4-mobile, gpt4-browsing support
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer committed May 27, 2023
1 parent 18cc809 commit 597cc7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/config/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ export const ModelMode = {
fast: 'Fast',
}

export const chatgptWebModelKeys = ['chatgptFree35', 'chatgptPlus4']
export const chatgptWebModelKeys = [
'chatgptFree35',
'chatgptPlus4',
'chatgptFree35Mobile',
'chatgptPlus4Browsing',
'chatgptPlus4Mobile',
]
export const bingWebModelKeys = ['bingFree4', 'bingFreeSydney']
export const gptApiModelKeys = ['gptApiDavinci']
export const chatgptApiModelKeys = ['chatgptApi35', 'chatgptApi4_8k', 'chatgptApi4_32k']
Expand All @@ -48,7 +54,10 @@ export const poeWebModelKeys = [
*/
export const Models = {
chatgptFree35: { value: 'text-davinci-002-render-sha', desc: 'ChatGPT (Web)' },
chatgptFree35Mobile: { value: 'text-davinci-002-render-sha-mobile', desc: 'ChatGPT (Mobile)' },
chatgptPlus4: { value: 'gpt-4', desc: 'ChatGPT (Web, GPT-4)' },
chatgptPlus4Browsing: { value: 'gpt-4-browsing', desc: 'ChatGPT (Web, GPT-4, Browsing)' },
chatgptPlus4Mobile: { value: 'gpt-4-mobile', desc: 'ChatGPT (Mobile, GPT-4)' },
chatgptApi35: { value: 'gpt-3.5-turbo', desc: 'ChatGPT (GPT-3.5-turbo)' },
bingFree4: { value: '', desc: 'Bing (Web, GPT-4)' },
bingFreeSydney: { value: '', desc: 'Bing (Web, GPT-4, Sydney)' },
Expand Down Expand Up @@ -133,7 +142,9 @@ export const defaultConfig = {
alwaysCreateNewConversationWindow: false,
activeApiModes: [
'chatgptFree35',
'chatgptFree35Mobile',
'chatgptPlus4',
'chatgptPlus4Mobile',
'chatgptApi35',
'bingFree4',
'bingFreeSydney',
Expand Down
2 changes: 1 addition & 1 deletion src/services/apis/chatgpt-web.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function generateAnswersWithChatgptWebApi(port, question, session,
})
console.debug('models', models)
const config = await getUserConfig()
const selectedModel = Models[config.modelName].value
const selectedModel = Models[session.modelName].value
const usedModel =
models && models.includes(selectedModel) ? selectedModel : Models[chatgptWebModelKeys[0]].value
console.debug('usedModel', usedModel)
Expand Down

0 comments on commit 597cc7c

Please sign in to comment.