JS Code Generator
- #Work Productivity
The client’s goal was to develop a solution that would generate and test JS code using OpenAi’s GPT-3.5 model. The model should be able to get results from Google and Stack Overflow to improve the generation quality.
- Machine Learning

Impact
The solution quickly generates and tests simple functions, that save time for employees and improve their productivity.
Services we provided
A solution to generate and test JavaScript functions using online resources, improving code quality and productivity.
Tech Stack
Python
Django
LangChain
Docker
Challenges and Solutions
🧐 Challenges
- Connecting the LLM to Google and Stack Overflow
- Dynamically testing the generated code
💡 Solutions
To connect the model to the internet it was decided to use a ReAct Agent and provide it with tools necessary to connect to Google and Stack Overflow. The Google tool is natively available in LangChain, but the Stack Overflow tool had to be developed separately. The pipeline for processing the user’s request is as follows:
- The user’s request is passed to the Agent
- The agent decides which tools to use, if any to generate the JS code formatted as a function within a module
- The code is running within a VM and the function is executed with test arguments
User flow