Spaces:
Runtime error
Runtime error
File size: 547 Bytes
c7052c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | import { ProviderAPIConfig } from '../types';
export const LambdaAPIConfig: ProviderAPIConfig = {
getBaseURL: () => `https://api.lambdalabs.com/v1`,
headers({ providerOptions }) {
const { apiKey } = providerOptions;
const headers = {
Authorization: `Bearer ${apiKey}`,
};
return headers;
},
getEndpoint({ fn }) {
switch (fn) {
case 'chatComplete': {
return '/chat/completions';
}
case 'complete': {
return '/completions';
}
default:
return '';
}
},
};
|