diff --git a/src/background/apis/bing-web.mjs b/src/background/apis/bing-web.mjs
index fdb4d61..c8668c1 100644
--- a/src/background/apis/bing-web.mjs
+++ b/src/background/apis/bing-web.mjs
@@ -1,4 +1,5 @@
import BingAIClient from '../clients/BingAIClient'
+import { getUserConfig } from '../../config/index.mjs'
/**
* @param {Runtime.Port} port
@@ -49,6 +50,7 @@ export async function generateAnswersWithBingWebApi(
answer = answer.replaceAll(/\[\^\d+\^\]/g, '')
port.postMessage({ answer: answer, done: false, session: null })
},
+ toneStyle: (await getUserConfig()).modelMode,
})
.catch((err) => {
port.onMessage.removeListener(stopListener)
diff --git a/src/config/index.mjs b/src/config/index.mjs
index 7bda344..6bcb794 100644
--- a/src/config/index.mjs
+++ b/src/config/index.mjs
@@ -39,6 +39,13 @@ export const ThemeMode = {
auto: 'Auto',
}
+export const ModelMode = {
+ balanced: 'Balanced',
+ creative: 'Creative',
+ precise: 'Precise',
+ fast: 'Fast',
+}
+
export const maxResponseTokenLength = 1000
/**
@@ -54,6 +61,8 @@ export const defaultConfig = {
/** @type {keyof Models}*/
modelName: 'chatgptFree35',
apiKey: '',
+ /** @type {keyof ModelMode}*/
+ modelMode: 'balanced',
preferredLanguage: navigator.language.substring(0, 2),
insertAtTop: isMobile(),
lockWhenAnswer: false,
@@ -128,6 +137,10 @@ export function isUsingApiKey(config) {
)
}
+export function isUsingMultiModeModel(config) {
+ return bingWebModelKeys.includes(config.modelName)
+}
+
export function isUsingCustomModel(config) {
return customApiModelKeys.includes(config.modelName)
}
diff --git a/src/popup/Popup.jsx b/src/popup/Popup.jsx
index 78da618..82c2436 100644
--- a/src/popup/Popup.jsx
+++ b/src/popup/Popup.jsx
@@ -5,6 +5,8 @@ import {
getUserConfig,
isUsingApiKey,
isUsingCustomModel,
+ isUsingMultiModeModel,
+ ModelMode,
Models,
setUserConfig,
ThemeMode,
@@ -78,7 +80,9 @@ function GeneralPart({ config, updateConfig }) {
+ {isUsingMultiModeModel(config) && (
+
+
+
+ )}
{isUsingApiKey(config) && (