This package contains implementation of an application to generate classes of any programming language, with Gemini Pro integrated into it.
Project description
gemini-pro-class-generator
Even wondered about generating classes with their attributes and methods without manually writing hundreds of lines of code? Gemini Pro Class Generator is the tool to do so. This tool generates code for a class in a programming language of your choice based on the given specifications.
Source Code
The source code of the application Gemini Pro Class Generator is available in Source Code.
Installation
pip install gemini-pro-class-generator
How to Use the Application?
Pre-requisites:
- Python installed in your device.
- .env file in the same directory as <GEMINI_PRO_CLASS_GENERATOR_DIRECTORY> and has the value of GEMINI_API_KEY.
First, open a Terminal or Command Prompt window and run the following command.
cd <GEMINI_PRO_CLASS_GENERATOR_DIRECTORY>
python3 main.py
Note: Replace <GEMINI_PRO_CLASS_GENERATOR_DIRECTORY> with the path to the directory of the application Gemini Pro Class Generator.
Then, the application will start with something looking like in the screenshot below.
You will then be asked to input the following values.
- Temperature - between 0 and 1 inclusive
- Top P - between 0 and 1 inclusive
- Top K - at least 1
- Max output tokens - at least 1
The following screenshot shows what is displayed after inputting the mentioned values.
You will be required to input the following pieces of information.
- The name of the programming language you want to create a class in.
- The name of the class you want to create.
- The number of attributes you want to include in the class.
- Name and description of each class attribute.
- The number of methods you want to include in the class.
- Name and description of each class method.
Once you enter the values mentioned above, the file containing the code will be created inside "classes" directory. Then, you will be asked whether you still want to continue unit testing or not. If you enter 'Y', you will be redirected to an application window like in screenshot above. Else, you will exit the application.
Below demonstrates how a class generated by the application looks like.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gemini-pro-class-generator-1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e986d320043db6df189239404e2eced9acaa66c6eb6dbab2bed908f2749b76f |
|
MD5 | d956b00b3b41132970329b1bf4f0821c |
|
BLAKE2b-256 | a8a9826a268fa41fa0ee31194696af8a9aa4df15638cc5667568b2f860f8ec4e |
Hashes for gemini_pro_class_generator-1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51572e8b6bb6ad9fc290bf98c89d867fdad31c44174b18e7a2055ecbee075bc9 |
|
MD5 | 8d2dc450cc2aa451fbe5992386bdaf72 |
|
BLAKE2b-256 | d3b1fcd16115078ede9210f681b15a7c22dc31e13c3e5a4c51988f4d498b331e |