Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add VITE prefix to Token env var name #469

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#VITE_API_BASE=http://localhost:5174
#VITE_ENDPOINT_COMPLETIONS=/v1/chat/completions
#VITE_ENDPOINT_MODELS=/v1/models
#OPENAI_API_KEY="your-openai-api-key"
#VITE_OPENAI_API_KEY="your-openai-api-key"
2 changes: 1 addition & 1 deletion src/lib/Storage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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.VITE_OPENAI_API_KEY || ''
export const apiKeyStorage = persisted('apiKey', apiKeyFromEnv as string)
export let checkStateChange = writable(0) // Trigger for Chat
export let showSetChatSettings = writable(false) //
Expand Down