Skip to main content

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:

  1. Python installed in your device.
  2. .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.

Application

You will then be asked to input the following values.

  1. Temperature - between 0 and 1 inclusive
  2. Top P - between 0 and 1 inclusive
  3. Top K - at least 1
  4. Max output tokens - at least 1

The following screenshot shows what is displayed after inputting the mentioned values.

Code Generator

You will be required to input the following pieces of information.

  1. The name of the programming language you want to create a class in.
  2. The name of the class you want to create.
  3. The number of attributes you want to include in the class.
  4. Name and description of each class attribute.
  5. The number of methods you want to include in the class.
  6. 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.

Code Generator End

Below demonstrates how a class generated by the application looks like.

Generated Class

Project details


Release history Release notifications | RSS feed

This version

1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gemini-pro-class-generator-1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

gemini_pro_class_generator-1-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page