mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-19 16:28:42 +00:00
Adds Google VertexAI as model provider
This commit is contained in:
@ -11,11 +11,12 @@ const loadEnv = () => {
|
||||
GENERAL: {
|
||||
NEXT_PUBLIC_SUPER_SECRET_KEY: process.env.NEXT_PUBLIC_SUPER_SECRET_KEY!,
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL!,
|
||||
NEXT_PUBLIC_WS_URL: process.env.NEXT_PUBLIC_WS_URL!
|
||||
NEXT_PUBLIC_WS_URL: process.env.NEXT_PUBLIC_WS_URL!,
|
||||
},
|
||||
} as Config;
|
||||
};
|
||||
|
||||
export const getAccessKey = () => loadEnv().GENERAL.NEXT_PUBLIC_SUPER_SECRET_KEY;
|
||||
export const getAccessKey = () =>
|
||||
loadEnv().GENERAL.NEXT_PUBLIC_SUPER_SECRET_KEY;
|
||||
|
||||
export const getBackendURL = () => loadEnv().GENERAL.NEXT_PUBLIC_API_URL;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import clsx, { ClassValue } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
import { getAccessKey, getBackendURL } from './config'
|
||||
import { getAccessKey, getBackendURL } from './config';
|
||||
|
||||
export const cn = (...classes: ClassValue[]) => twMerge(clsx(...classes));
|
||||
|
||||
@ -29,11 +29,11 @@ export const clientFetch = async (path: string, payload: any): Promise<any> => {
|
||||
if (secretToken) {
|
||||
if (headers == null) {
|
||||
headers = {};
|
||||
};
|
||||
}
|
||||
|
||||
headers['Authorization'] = `Bearer ${secretToken}`;
|
||||
payload.headers = headers;
|
||||
};
|
||||
}
|
||||
|
||||
return await fetch(url, payload);
|
||||
};
|
||||
|
Reference in New Issue
Block a user