Feat [Server Side] Google Api Configuration

- [+] feat(server.ts): add support for Google API configuration variables
This commit is contained in:
H0llyW00dzZ 2023-12-25 00:35:33 +07:00
parent 35471a41c8
commit 281fe6927a
No known key found for this signature in database
GPG Key ID: 05C7FFFC0845C930

View File

@ -65,6 +65,7 @@ export const getServerSideConfig = () => {
} }
const isAzure = !!process.env.AZURE_URL; const isAzure = !!process.env.AZURE_URL;
const isGoogle = !!process.env.GOOGLE_URL;
const apiKeyEnvVar = process.env.OPENAI_API_KEY ?? ""; const apiKeyEnvVar = process.env.OPENAI_API_KEY ?? "";
const apiKeys = apiKeyEnvVar.split(",").map((v) => v.trim()); const apiKeys = apiKeyEnvVar.split(",").map((v) => v.trim());
@ -84,6 +85,7 @@ export const getServerSideConfig = () => {
azureApiKey: process.env.AZURE_API_KEY, azureApiKey: process.env.AZURE_API_KEY,
azureApiVersion: process.env.AZURE_API_VERSION, azureApiVersion: process.env.AZURE_API_VERSION,
isGoogle,
googleApiKey: process.env.GOOGLE_API_KEY, googleApiKey: process.env.GOOGLE_API_KEY,
googleUrl: process.env.GOOGLE_URL, googleUrl: process.env.GOOGLE_URL,