Skip to content

Commit

Permalink
Merge pull request #352 from Portkey-AI/fix/zhipu-auth-bearer
Browse files Browse the repository at this point in the history
fix: add bearer to zhipu-ai authorization header
  • Loading branch information
VisargD committed May 9, 2024
2 parents 4183ad5 + 6cc03e4 commit 070f537
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/zhipu/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ProviderAPIConfig } from '../types';
const ZhipuAPIConfig: ProviderAPIConfig = {
getBaseURL: () => 'https://open.bigmodel.cn/api/paas/v4',
headers: ({ providerOptions }) => {
return { Authorization: `${providerOptions.apiKey}` }; // https://open.bigmodel.cn/usercenter/apikeys
return { Authorization: `Bearer ${providerOptions.apiKey}` }; // https://open.bigmodel.cn/usercenter/apikeys
},
getEndpoint: ({ fn }) => {
switch (fn) {
Expand Down

0 comments on commit 070f537

Please sign in to comment.