mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
Enable petals via uri
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import Home from './lib/Home.svelte'
|
||||
import Chat from './lib/Chat.svelte'
|
||||
import NewChat from './lib/NewChat.svelte'
|
||||
import { chatsStorage } from './lib/Storage.svelte'
|
||||
import { chatsStorage, setGlobalSettingValueByKey } from './lib/Storage.svelte'
|
||||
import { Modals, closeModal } from 'svelte-modals'
|
||||
import { dispatchModalEsc, checkModalEsc } from './lib/Util.svelte'
|
||||
import { set as setOpenAI } from './lib/providers/openai/util.svelte'
|
||||
@@ -19,6 +19,10 @@
|
||||
if (urlParams.has('key')) {
|
||||
setOpenAI({ apiKey: urlParams.get('key') as string })
|
||||
}
|
||||
if (urlParams.has('petals')) {
|
||||
console.log('enablePetals')
|
||||
setGlobalSettingValueByKey('enablePetals', true)
|
||||
}
|
||||
|
||||
// The definition of the routes with some conditions
|
||||
const routes = {
|
||||
|
||||
Reference in New Issue
Block a user