Support Frugal Mode
This commit is contained in:
@@ -7,6 +7,7 @@ const currentModel = useCurrentModel()
|
||||
const openaiApiKey = useApiKey()
|
||||
const fetchingResponse = ref(false)
|
||||
const messageQueue = []
|
||||
const frugalMode = ref(true)
|
||||
let isProcessingQueue = false
|
||||
|
||||
const props = defineProps({
|
||||
@@ -64,7 +65,8 @@ const fetchReply = async (message) => {
|
||||
const data = Object.assign({}, currentModel.value, {
|
||||
openaiApiKey: enableCustomApiKey.value ? openaiApiKey.value : null,
|
||||
message: message,
|
||||
conversationId: props.conversation.id
|
||||
conversationId: props.conversation.id,
|
||||
frugalMode: frugalMode.value
|
||||
}, webSearchParams)
|
||||
|
||||
try {
|
||||
@@ -259,11 +261,42 @@ onNuxtReady(() => {
|
||||
<v-switch
|
||||
v-if="showWebSearchToggle"
|
||||
v-model="enableWebSearch"
|
||||
inline
|
||||
hide-details
|
||||
color="primary"
|
||||
:label="$t('webSearch')"
|
||||
></v-switch>
|
||||
<v-spacer></v-spacer>
|
||||
<v-switch
|
||||
v-model="frugalMode"
|
||||
inline
|
||||
hide-details
|
||||
color="primary"
|
||||
:label="$t('frugalMode')"
|
||||
></v-switch>
|
||||
<v-dialog
|
||||
transition="dialog-bottom-transition"
|
||||
width="auto"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon
|
||||
color="grey"
|
||||
v-bind="props"
|
||||
icon="help_outline"
|
||||
></v-icon>
|
||||
</template>
|
||||
<template v-slot:default="{ isActive }">
|
||||
<v-card>
|
||||
<v-toolbar
|
||||
color="primary"
|
||||
:title="$t('frugalMode')"
|
||||
></v-toolbar>
|
||||
<v-card-text>
|
||||
{{ $t('frugalModeTip') }}
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
</v-dialog>
|
||||
</v-toolbar>
|
||||
</div>
|
||||
</v-footer>
|
||||
|
||||
@@ -51,7 +51,6 @@ const bindCopyCodeToButtons = () => {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
console.log('mounted')
|
||||
bindCopyCodeToButtons()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user