From 6e96aeb821300ea40330939758a54ed3ac52cc26 Mon Sep 17 00:00:00 2001 From: Richard Roberson Date: Tue, 4 Feb 2025 23:01:44 -0700 Subject: [PATCH] Use open ai api as default in docker --- .gitignore | 1 + src/contexts/ConfigContext.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e72b4d6..80e1a99 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ yarn-error.log* # env files (can opt-in for committing if needed) .env +.dockerignore # vercel .vercel diff --git a/src/contexts/ConfigContext.tsx b/src/contexts/ConfigContext.tsx index 448243d..8b41265 100644 --- a/src/contexts/ConfigContext.tsx +++ b/src/contexts/ConfigContext.tsx @@ -64,8 +64,8 @@ export function ConfigProvider({ children }: { children: React.ReactNode }) { if (cachedSkipBlank) console.log('Cached skip blank found:', cachedSkipBlank); // If not in cache, use env variables - const defaultApiKey = process.env.NEXT_PUBLIC_OPENAI_API_KEY || ''; - const defaultBaseUrl = process.env.NEXT_PUBLIC_OPENAI_API_BASE || ''; + const defaultApiKey = process.env.NEXT_PUBLIC_OPENAI_API_KEY || '1234567890'; + const defaultBaseUrl = process.env.NEXT_PUBLIC_OPENAI_API_BASE || 'https://api.openai.com/v1'; // Set the values setApiKey(cachedApiKey || defaultApiKey);