Enable petals via uri
This commit is contained in:
parent
98dbaec35a
commit
ed0dbe1188
|
@ -7,7 +7,7 @@
|
||||||
import Home from './lib/Home.svelte'
|
import Home from './lib/Home.svelte'
|
||||||
import Chat from './lib/Chat.svelte'
|
import Chat from './lib/Chat.svelte'
|
||||||
import NewChat from './lib/NewChat.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 { Modals, closeModal } from 'svelte-modals'
|
||||||
import { dispatchModalEsc, checkModalEsc } from './lib/Util.svelte'
|
import { dispatchModalEsc, checkModalEsc } from './lib/Util.svelte'
|
||||||
import { set as setOpenAI } from './lib/providers/openai/util.svelte'
|
import { set as setOpenAI } from './lib/providers/openai/util.svelte'
|
||||||
|
@ -19,6 +19,10 @@
|
||||||
if (urlParams.has('key')) {
|
if (urlParams.has('key')) {
|
||||||
setOpenAI({ apiKey: urlParams.get('key') as string })
|
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
|
// The definition of the routes with some conditions
|
||||||
const routes = {
|
const routes = {
|
||||||
|
|
Loading…
Reference in New Issue