Dolor D Prince
deploy: dolor3v gateway v1.0
c7052c4
Raw
History Blame Contribute Delete
843 Bytes
import { ProviderAPIConfig } from '../types';
const DeepbricksAPIConfig: ProviderAPIConfig = {
getBaseURL: () => 'https://api.deepbricks.ai/v1',
headers: ({ providerOptions }) => {
const headersObj: Record<string, string> = {
Authorization: `Bearer ${providerOptions.apiKey}`,
};
if (providerOptions.openaiOrganization) {
headersObj['Deepbricks-Organization'] = providerOptions.openaiOrganization;
}
if (providerOptions.openaiProject) {
headersObj['Deepbricks-Project'] = providerOptions.openaiProject;
}
return headersObj;
},
getEndpoint: ({ fn }) => {
switch (fn) {
case 'chatComplete':
return '/chat/completions';
case 'imageGenerate':
return '/images/generations';
default:
return '';
}
},
};
export default DeepbricksAPIConfig;