TensionCode
Function Generator (Hackniche 2.0)
Install / Use
/learn @abhaymathur21/TensionCodeREADME
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.
<img width="900" alt="image" src="https://github.com/abhaymathur21/TensionCode/assets/102252920/42909a38-25e1-4364-8c6b-7711bc065f79">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. <br> <br> <img width="323" alt="image" src="https://github.com/abhaymathur21/TensionCode/assets/102252920/ab402a1c-610a-4302-81dc-44650ecce810">
-
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.
https://github.com/abhaymathur21/TensionCode/assets/102252920/6f82344a-c609-4bea-9434-ff6499053ccf
-
Schema Extraction from ER-diagram: We use Gemini Pro Vision to perform OCR and extract schemas from Entity-Relationship diagrams. <br> <br> <img align="top" width="556" alt="image" src="https://github.com/abhaymathur21/TensionCode/assets/102252920/259dad83-07ad-4162-906d-5c2b90b1e9eb"> <img align="middle" width="132" alt="image" src="https://github.com/abhaymathur21/TensionCode/assets/102252920/52b77c7d-52aa-4816-8e5d-b4c8f21575c8">
-
Flowchart Generation: We use flowchart.js to generate flowcharts of the generated code to help developers visualize the code logic and structure. <br> <br> <img width="739" alt="image" src="https://github.com/abhaymathur21/TensionCode/assets/102252920/5c19281f-f77d-43bd-bdd7-f4509770f287">
-
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. <br> <br> <img width="739" alt="image" src="https://github.com/abhaymathur21/TensionCode/assets/102252920/d5e7763b-612f-4600-a266-c019a499a2f9">
-
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. <br> <br><img width="739" alt="image" src="https://github.com/abhaymathur21/TensionCode/assets/102252920/43a5a0ed-dd23-4fee-8e3d-f6bef8142b40">
-
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. <br> <br> <img width="739" alt="image" src="https://github.com/abhaymathur21/TensionCode/assets/102252920/b7fa8b6b-3745-4393-906e-59c9d7eb6eb7">
Setup Instructions
- Clone the Repository: Clone this repository to your local machine using
git clone https://github.com/abhaymathur21/TensionCode.git - Install Dependencies: Use
pip install -r requirements.txtto install all dependencies for the backend. Then, navigate to the frontend directory (cd tensioncode) and install the necessary dependencies usingnpm i - 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.
- Run the Application: Start the application by running the appropriate commands i.e.:
npm run devfor the frontend andpython app.pyfor the backend, and access it via the specified URL.
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
