Use open ai api as default in docker
This commit is contained in:
parent
6a6ad6510e
commit
6e96aeb821
2 changed files with 3 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -32,6 +32,7 @@ yarn-error.log*
|
||||||
|
|
||||||
# env files (can opt-in for committing if needed)
|
# env files (can opt-in for committing if needed)
|
||||||
.env
|
.env
|
||||||
|
.dockerignore
|
||||||
|
|
||||||
# vercel
|
# vercel
|
||||||
.vercel
|
.vercel
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ export function ConfigProvider({ children }: { children: React.ReactNode }) {
|
||||||
if (cachedSkipBlank) console.log('Cached skip blank found:', cachedSkipBlank);
|
if (cachedSkipBlank) console.log('Cached skip blank found:', cachedSkipBlank);
|
||||||
|
|
||||||
// If not in cache, use env variables
|
// If not in cache, use env variables
|
||||||
const defaultApiKey = process.env.NEXT_PUBLIC_OPENAI_API_KEY || '';
|
const defaultApiKey = process.env.NEXT_PUBLIC_OPENAI_API_KEY || '1234567890';
|
||||||
const defaultBaseUrl = process.env.NEXT_PUBLIC_OPENAI_API_BASE || '';
|
const defaultBaseUrl = process.env.NEXT_PUBLIC_OPENAI_API_BASE || 'https://api.openai.com/v1';
|
||||||
|
|
||||||
// Set the values
|
// Set the values
|
||||||
setApiKey(cachedApiKey || defaultApiKey);
|
setApiKey(cachedApiKey || defaultApiKey);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue