Skip to content

"A code Converter application, empowered by the ChatGPT API, designed to facilitate effortless code migration across different programming languages. With Debuging and Quality check functionality also user can copy converted code at other place by clicking on button

Notifications You must be signed in to change notification settings

8309h/CodeConvertor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

CodeConvertor

Code Converter App

A simple web application for converting and enhancing code using OpenAI's GPT-3.

Table of Contents

Introduction

This web application uses OpenAI's GPT-3 to provide code conversion, debugging, and code quality assessment services. You can use this application to:

  • Convert code from one programming language to another.
  • Debug code by checking for errors and providing corrections.
  • Assess the quality of code and receive improvement suggestions.

Features

  • Code conversion between different programming languages.
  • Code debugging and error correction.
  • Code quality assessment with improvement suggestions.

Getting Started

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js and npm installed on your local development machine.
  • An OpenAI API key. You can obtain one by signing up at OpenAI.

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/CodeConvertor.git
  2. Navigate to the project directory:

    cd code_converter
  3. Install the required dependencies:

    npm install
  4. Create a .env file in the root directory of the project and add your OpenAI API key:

    API_KEY=your_openai_api_key_here
    

Usage

Convert Code

To convert code from one programming language to another:

  1. Make a POST request to /convert with the following JSON payload:

    {
      "code": "your_source_code_here",
      "language": "target_language_here"
    }
  2. The server will respond with the converted code.

Debug Code

To debug code and check for errors:

  1. Make a POST request to /debug with the following JSON payload:

    {
      "prompt": "your_code_to_debug_here"
    }
  2. The server will respond with debug information, error checking, and corrections if needed.

Quality Check

To assess the quality of code and receive improvement suggestions:

  1. Make a POST request to /quality with the following JSON payload:

    {
      "prompt": "code_to_assess_quality_here"
    }
  2. The server will respond with detailed quality assessment and improvement tips.

API Endpoints

  • /convert: Converts code from one language to another.
  • /debug: Debugs code and provides error checking and corrections.
  • /quality: Assesses the quality of code and offers improvement suggestions.

Configuration

You can configure the application by setting the API key in the .env file.

About

"A code Converter application, empowered by the ChatGPT API, designed to facilitate effortless code migration across different programming languages. With Debuging and Quality check functionality also user can copy converted code at other place by clicking on button

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published