make token env var optional with defult value

This commit is contained in:
Artiom Levinton
2024-05-23 13:23:24 +03:00
parent ed1cb1e8fe
commit 89ec802a92
2 changed files with 2 additions and 2 deletions

View File

@@ -13,7 +13,7 @@
export const chatsStorage = persisted('chats', [] as Chat[])
export const latestModelMap = persisted('latestModelMap', {} as Record<Model, Model>) // What was returned when a model was requested
export const globalStorage = persisted('global', {} as GlobalSettings)
const apiKeyFromEnv = import.meta.env.OPENAI_API_KEY
const apiKeyFromEnv = import.meta.env.OPENAI_API_KEY || 'some default token'
export const apiKeyStorage = persisted('apiKey', apiKeyFromEnv as string)
export let checkStateChange = writable(0) // Trigger for Chat
export let showSetChatSettings = writable(false) //