Skip to content

Commit

Permalink
refactor: use OPENAI_API_KEY instead of OPENAI_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon committed Jan 24, 2024
1 parent f5725fc commit f82124b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OPENAI_MODEL=gpt-3.5-turbo
OPENAI_KEY=
OPENAI_API_KEY=
LOG_FILE=/app/helix-gpt.log
OPENAI_CONTEXT=
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,4 @@ out
.DS_Store

helix-gpt.log
dist/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can configure helix-gpt by exposing either the environment variables below,
Environment vars
```
OPENAI_MODEL=gpt-3.5-turbo # Optional
OPENAI_KEY=123 # required
OPENAI_API_KEY=123 # required
LOG_FILE=/app/debug-helix-gpt.log # Optional
OPENAI_CONTEXT="A terrible code completion assistant" # Optional
```
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { parseArgs } from "util"
import { context } from "./constants"

const { values, positionals } = parseArgs({
const { values } = parseArgs({
args: Bun.argv,
options: {
openaiKey: {
type: 'string',
default: Bun.env.OPENAI_KEY
default: Bun.env.OPENAI_API_KEY
},
openaiContext: {
type: 'string',
Expand Down

0 comments on commit f82124b

Please sign in to comment.