add optional config for users who belong to multiple organizations pass a header OpenAI-Organization to specify which organization is used for an API request (#145)

Co-authored-by: lushenle <lushenle@bytedance.com>
This commit is contained in:
Shenle Lu
2024-01-31 21:47:50 +08:00
committed by GitHub
parent 30ff20ee4f
commit 59e87341a9
3 changed files with 18 additions and 5 deletions

4
process.d.ts vendored
View File

@ -13,6 +13,10 @@ declare namespace NodeJS {
NEXT_PUBLIC_ALLOW_SELF_OPENAI_KEY: string;
// Required. Do not share your OpenAI API key with anyone! It should remain a secret.
OPENAI_API_KEY: string;
// Optional.For users who belong to multiple organizations,
// you can pass a header to specify which organization is used for an API request.
// Usage from these API requests will count as usage for the specified organization.
OPENAI_ORGANIZATION: string;
// Optional. OpenAI API endpoint. Defaults to https://api.openai.com.
OPENAI_API_ENDPOINT: string;
// Optional. NextAuth.js URL. Defaults to the current domain.