Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
288c9eeeca | ||
|
|
4d09ff7c8a | ||
|
|
5fa059017c |
@@ -98,6 +98,15 @@ const signOut = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const settings = useSettings()
|
||||||
|
const showApiKeySetting = ref(false)
|
||||||
|
watchEffect(() => {
|
||||||
|
if (settings.value) {
|
||||||
|
const settingsValue = toRaw(settings.value)
|
||||||
|
showApiKeySetting.value = settingsValue.open_api_key_setting && settingsValue.open_api_key_setting === 'True'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loadConversations()
|
loadConversations()
|
||||||
loadSettings()
|
loadSettings()
|
||||||
@@ -239,6 +248,10 @@ onMounted(async () => {
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
|
<ApiKeyDialog
|
||||||
|
v-if="showApiKeySetting"
|
||||||
|
/>
|
||||||
|
|
||||||
<ModelParameters/>
|
<ModelParameters/>
|
||||||
|
|
||||||
<v-menu
|
<v-menu
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
const appName = 'ChatGPT UI'
|
const appName = process.env.NUXT_PUBLIC_APP_NAME ?? 'ChatGPT UI'
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
dev: false,
|
dev: false,
|
||||||
@@ -14,6 +14,7 @@ export default defineNuxtConfig({
|
|||||||
appName: appName,
|
appName: appName,
|
||||||
typewriter: false,
|
typewriter: false,
|
||||||
typewriterDelay: 50,
|
typewriterDelay: 50,
|
||||||
|
customApiKey: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const fetchReply = async (message) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const data = Object.assign({}, currentModel.value, {
|
const data = Object.assign({}, currentModel.value, {
|
||||||
openaiApiKey: openaiApiKey.value,
|
openaiApiKey: enableCustomApiKey.value ? openaiApiKey.value : null,
|
||||||
message: message,
|
message: message,
|
||||||
conversationId: currentConversation.value.id
|
conversationId: currentConversation.value.id
|
||||||
}, webSearchParams)
|
}, webSearchParams)
|
||||||
@@ -165,6 +165,7 @@ const deleteMessage = (index) => {
|
|||||||
|
|
||||||
const showWebSearchToggle = ref(false)
|
const showWebSearchToggle = ref(false)
|
||||||
const enableWebSearch = ref(false)
|
const enableWebSearch = ref(false)
|
||||||
|
const enableCustomApiKey = ref(false)
|
||||||
|
|
||||||
const settings = useSettings()
|
const settings = useSettings()
|
||||||
|
|
||||||
@@ -172,6 +173,7 @@ watchEffect(() => {
|
|||||||
if (settings.value) {
|
if (settings.value) {
|
||||||
const settingsValue = toRaw(settings.value)
|
const settingsValue = toRaw(settings.value)
|
||||||
showWebSearchToggle.value = settingsValue.open_web_search && settingsValue.open_web_search === 'True'
|
showWebSearchToggle.value = settingsValue.open_web_search && settingsValue.open_web_search === 'True'
|
||||||
|
enableCustomApiKey.value = settingsValue.open_api_key_setting && settingsValue.open_api_key_setting === 'True'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user