Skip to content

Commit bf37d76

Browse files
committed
chore: add env var to ProcessEnv
1 parent fa0cbfa commit bf37d76

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.env.example

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
# Do not share your OpenAI API key with anyone! It should remain a secret.
1+
# see process.d.ts
22
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
3-
# Optional.
4-
# OPENAI_API_ENDPOINT=YOUR_OPENAI_API_ENDPOINT
5-
# USAGE_DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=sqlchat_usage
6-
# NEXT_PUBLIC_API_KEY=YOUR_API_KEY

process.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
declare namespace NodeJS {
2+
export interface ProcessEnv {
3+
// Required. Do not share your OpenAI API key with anyone! It should remain a secret.
4+
OPENAI_API_KEY: string;
5+
// Optional. OpenAI API endpoint. Defaults to https://api.openai.com.
6+
OPENAI_API_ENDPOINT: string;
7+
// Optional. Database connection string to store the usage data.
8+
USAGE_DATABASE_URL: string;
9+
// Optional. API key to protect the backend API endpoint.
10+
// This needs to be exposed to the frontend and must be prefixed with NEXT_PUBLIC_.
11+
NEXT_PUBLIC_API_KEY: string;
12+
}
13+
}

0 commit comments

Comments
 (0)