fix
Showing
2 changed files
with
3 additions
and
3 deletions
| ... | @@ -10,8 +10,8 @@ Create an .env file in the root directory of your application. | ... | @@ -10,8 +10,8 @@ Create an .env file in the root directory of your application. |
| 10 | Duplicate the env-template and rename to .env | 10 | Duplicate the env-template and rename to .env |
| 11 | In the .env file, define the environment variables you want to use in your application. ex. | 11 | In the .env file, define the environment variables you want to use in your application. ex. |
| 12 | 12 | ||
| 13 | `API_KEY="sk-xxxxxxxx"` | 13 | `OPENAI_API_KEY="sk-xxxxxxxx"` |
| 14 | `API_ORG="org-xxxxxxx"` | 14 | `OPENAI_API_ORG="org-xxxxxxx"` |
| 15 | 15 | ||
| 16 | ## Run server | 16 | ## Run server |
| 17 | 17 | ... | ... |
| ... | @@ -60,7 +60,7 @@ function App() { | ... | @@ -60,7 +60,7 @@ function App() { |
| 60 | }); | 60 | }); |
| 61 | const data = await response.json(); | 61 | const data = await response.json(); |
| 62 | const parsedData = data.message.trim(); | 62 | const parsedData = data.message.trim(); |
| 63 | console.log(parsedData) | 63 | // console.log(parsedData) |
| 64 | const programmingKeywords = ['code', 'application', 'controller', 'rails' , 'PHP', 'java', 'javascript', 'script', 'console', 'python', 'programming', 'table']; | 64 | const programmingKeywords = ['code', 'application', 'controller', 'rails' , 'PHP', 'java', 'javascript', 'script', 'console', 'python', 'programming', 'table']; |
| 65 | 65 | ||
| 66 | const regex = new RegExp(`\\b(${programmingKeywords.join('|')})\\b`, 'gi'); | 66 | const regex = new RegExp(`\\b(${programmingKeywords.join('|')})\\b`, 'gi'); | ... | ... |
-
Please register or sign in to post a comment