Skip to content

Commit

Permalink
v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
guazinit committed Sep 19, 2024
1 parent e7906e7 commit 2a07483
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.env
5 changes: 4 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import OpenAI from 'openai';
import dotenv from 'dotenv';

dotenv.config()

const openai = new OpenAI({
apiKey: 'INSERT OPENAI API KEY HERE',
apiKey: process.env.OPENAI_API_KEY,
});

async function getOpenAiResponse(prompt: string) {
Expand Down

0 comments on commit 2a07483

Please sign in to comment.