This repository contains the source code for a web application that utilizes the OpenAI GPT-3 Codex API to provide code generation and completion functionalities. The project is divided into two main parts: the client and the server.
- Code Generation: Generate code snippets based on natural language descriptions.
- Code Completion: Provide suggestions and auto-completions for code based on the current context.
- client: Contains the frontend code built with React.
- server: Contains the backend code using Node.js and Express.
- Node.js
- npm or yarn
- OpenAI API Key
-
Clone the repository:
git clone https://github.com/KrlosDev/GTP-3-API-Codex-App.git cd GTP-3-API-Codex-App
-
Install dependencies for both client and server:
cd client npm install cd ../server npm install
-
Set up environment variables: Create a
.env
file in the server directory and add your OpenAI API key:OPENAI_API_KEY=your_openai_api_key
-
Start the server:
cd server npm start
-
Start the client:
cd client npm run dev
- Enter a natural language description of the code you want to generate.
- Click the "Generate Code" button to receive the generated code snippet.
- Use the code completion feature by typing your code and observing the suggestions provided.
Contributions are welcome! Please create an issue or submit a pull request for any enhancements or bug fixes.