Dolor D Prince
deploy: dolor3v gateway v1.0
c7052c4
Raw
History Blame Contribute Delete
511 Bytes
import { ProviderAPIConfig } from '../types';
export const dashscopeAPIConfig: ProviderAPIConfig = {
getBaseURL: () => 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1',
headers({ providerOptions }) {
const { apiKey } = providerOptions;
return { Authorization: `Bearer ${apiKey}` };
},
getEndpoint({ fn }) {
switch (fn) {
case 'chatComplete':
return `/chat/completions`;
case 'embed':
return `/embeddings`;
default:
return '';
}
},
};