Skip to content

abhaymathur21/TensionCode

Repository files navigation

TensionCode - A Function Code Generator

Overview

We've developed a cutting-edge platform that streamlines the entire development process, from schema extraction to code generation and evaluation, all while offering seamless integration with popular development tools. Our tool generates function code in multiple languages from various structured and unstructured databases, with features including code explanation, VSCode & Google extension, code evaluation via reinforcement learning, YouTube educational video recommendations, and FlowChart and schema generation.

image

Need for Tension_Code

Traditional development workflows are often cumbersome and time-consuming, requiring developers to manually translate database schemas into functional code. This process is prone to errors, inefficiencies, and inconsistencies across different databases and programming languages. Moreover, maintaining version control and providing code explanations can be challenging, leading to reduced productivity and code quality.

Features

  • Function Code Generation: We provide the LLM with the task to be performed, database schema (structured or unstructured), output format and code language. The LLM then outputs a function in the specified code language that, when given actual data, will be able to give accurate outputs for the task specified.

    image

  • Function Code Evaluation: We use AutoGen to test and validate the LLM-generated function. AutoGen's User_Proxy agent creates a new file in the working directory specified, writes the generated code inside it and runs the code generated by the LLM on sample data that the AutoGen's LLM or Assistant agent generates itself. If an error is encountered, the User_Proxy agent sends the code along with the error back to the LLM and asks it to fix it. By automating error detection and soliciting user feedback, our system ensures robust, reliable code while continuously refining its performance by optimising the code to its best time and space complexity.

Inputs.txt.-.HackNiche.-.Visual.Studio.Code.2024-02-26.21-41-09.mp4
  • Schema Extraction from ER-diagram: We use Gemini Pro Vision to perform OCR and extract schemas from Entity-Relationship diagrams.

    image image

  • Flowchart Generation: We use flowchart.js to generate flowcharts of the generated code to help developers visualize the code logic and structure.

    image

  • YouTube Recommendations: We suggest YouTube videos relevant to the core logic of the code generated to help provide explanations of the concepts used in the code to developers.

    image

  • Google Extension for Code Explanation: Using our Google extension, the user can select any piece of code on any website on the internet and with the click of a button in our extension, an explanation for the code logic will be provided there and then to the user in the same window.

    image

  • Visual Studio Code Integration: Using our VS Code extension, the user can copy-paste or download our generated code directly into their VS Code project folder. This makes the developer's life much easier and boosts productivity.

    image

Setup Instructions

  1. Clone the Repository: Clone this repository to your local machine using git clone https://github.com/abhaymathur21/TensionCode.git
  2. Install Dependencies: Use pip install -r requirements.txt to install all dependencies for the backend. Then, navigate to the frontend directory (cd tensioncode) and install the necessary dependencies using npm i
  3. Configure Environment: Set up the OpenAI API key and Google Gemini Pro and Gemini Pro Vision API Keys in the .env file by creating your own keys after logging into the OpenAI platform and GCP platform respectively.
  4. Run the Application: Start the application by running the appropriate commands i.e.: npm run dev for the frontend and python app.py for the backend, and access it via the specified URL.

About

Function Generator (Hackniche 2.0)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •