Codementator is a helpful AI assistant to assist you while you code, either with friends or solo. The AI helps you add important comments to aid other collaborators in understanding your incomprehensible code. It can also be used to explain the code indepthly.
Website: https://codementator.streamlit.app/Code-Generator
To run the code:
- In the same folder, add a text file with your OpenAI API Key (OPENAI_API_KEY="sk-1234..") and name it
env.txt
. - Run the file and then type
streamlit run [file_name].py
in terminal.
or you can access it at https://codementator.streamlit.app/Code-Generator
Normal mode vs Advanced mode:
Copy and paste your code into the textbox, and select a coding language, and choose whether to get the AI to explain or comment your code.
Advanced mode allows you to tweak the temperature and the frequency of comments appearing in the code (Add to every line, add comments, and remove comments).
The code generator allows you to generate code in whatever language you'd like.
![image](https://private-user-images.githubusercontent.com/145328729/295801094-07b1809c-f2a9-4308-ba25-b3148b66902b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2ODcwNTEsIm5iZiI6MTczOTY4Njc1MSwicGF0aCI6Ii8xNDUzMjg3MjkvMjk1ODAxMDk0LTA3YjE4MDljLWYyYTktNDMwOC1iYTI1LWIzMTQ4YjY2OTAyYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQwNjE5MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04OWZkOTMxYjVkZGE1MGI2NzI1NjIzNDk5ODY1NTBkZmM1MjNmNWU1MmE3ZjdhYTJkODY4MGViYmQ3MTJmZjMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.OrJKFFeAk73SWIvUElboHRHUSmKFlLVNpMNU2biW8v8)
:)
Our code commentator makes use LangChain to access GPT-3.5 to indepthly explain and annotate code.