Skip to content

Commit

Permalink
feat: Support custom gateway URLs in Portkey (promptfoo#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
roh26it committed May 31, 2024
1 parent 822ddb6 commit a0e076c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions site/docs/integrations/portkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ providers:
team: xxx
portkeyConfig: xxx
portkeyProvider: xxx
portkeyApiBaseUrl: xxx
```
2 changes: 1 addition & 1 deletion src/providers/portkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class PortkeyChatCompletionProvider extends OpenAiChatCompletionProvider
...providerOptions,
config: {
...providerOptions.config,
apiBaseUrl: 'https://api.portkey.ai/v1',
apiBaseUrl: process.env.PORTKEY_API_BASE_URL || providerOptions.config?.portkeyApiBaseUrl || 'https://api.portkey.ai/v1',
headers,
},
});
Expand Down

0 comments on commit a0e076c

Please sign in to comment.