Skip to main content

A package for generating code snippets using GPT-3.5-turbo, developed with pyenv, built with build using setuptools, uploaded to PyPI using twine, and distributed via pip.

Project description

Python build & test

GPT Coder

Description

This package is designed to help users write better and more fun code. It allows users to modify the conciseness, commenting, and readability of the code returned by the GPT model. Through the usage of this package, users can expect code responses that are more tailored towards their preferences.

Instructions

Ensure that you already have pipenv installed. If not, you can install it by running the following command:

pip install pipenv

In order to use our package, run this line in your terminal:

pip install gptcoder

Then, add this line to the top of your file:

from gptcoder import GPTCoder

Functions

  1. set_language

    • Description: This function sets the language of the code to be generated.
    • Parameters:
      • language_code: int
        • Description: The code corresponding to the programming language of the code to be generated.
        • Values: 1. Python, 2. JavaScript, 3. Java, 4. C, 5. C++, 6. C#, 7. TypeScript, 8. PHP, 9. Swift, 10. Ruby
        • Default: 1
  2. set_conciseness

    • Description: This function sets the conciseness of the code to be generated.
    • Parameters:
      • conciseness: int
        • Description: The conciseness of the code to be generated.
        • Values: 1-10
        • Default: 1
  3. set_commenting

    • Description: This function sets the commenting of the code to be generated.
    • Parameters:
      • commenting: int
        • Description: The commenting of the code to be generated.
        • Values: 1-10
        • Default: 5
  4. set_readability

    • Description: This function sets the readability of the code to be generated.
    • Parameters:
      • readability: int
        • Description: The readability of the code to be generated.
        • Values: 1-10
        • Default: 10
  5. generate_code

    • Description: This function generates code based on the given prompt.
    • Parameters:
      • code_prompt: str
        • Description: The prompt for the code to be generated.
        • Values: Any string
        • Default: None

Contributing

To contribute to this project, follow these steps:

  1. Set up the virtual environment

    pip install pipenv
    cd path/to/project
    pipenv shell
    
  2. Install dependencies:

    Our project's dependencies are listed in the Pipfile. You can install them with pipenv:

    pipenv install gptcoder
    
  3. Build the package:

    The package can be built using the pyproject.toml file, which contains the build system (poetry) and the project metadata. To build the package, run:

    python3 -m build
    

How to run unit tests

Simple example unit tests are included within the tests directory. To run the tests:

  1. Install pytest in a virtual environment.
  2. Run the tests from the main project directory: python3 -m pytest.
  3. Tests should never fail.

Demo

Demo Program

Team Members

Package Page

gptcoder on PyPi

Project details


Download files

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

Source Distribution

gptcoder-0.1.4.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gptcoder-0.1.4-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file gptcoder-0.1.4.tar.gz.

File metadata

  • Download URL: gptcoder-0.1.4.tar.gz
  • Upload date:
  • Size: 43.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for gptcoder-0.1.4.tar.gz
Algorithm Hash digest
SHA256 05eaaff4554e875f30059d39a40317fa8e0c76fb277af29ee1d2b3a6c80ba1a2
MD5 99755886aee6811eb02989a42a9e83aa
BLAKE2b-256 f76e34967de70ca79a766ba145101a6d31b00b7cd917d55aeb563c240f79109d

See more details on using hashes here.

File details

Details for the file gptcoder-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: gptcoder-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 29.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for gptcoder-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e2486d656ec729f0f88a2894efeda1455e83658a5d68187a0062f20bbd7cbda2
MD5 21b3ffe10868d56313da2d3bba201465
BLAKE2b-256 d35cd1a29c3e9b5ff879d3e0b7df5915da3a0b6c1d50bf8d0c79f3846607ff55

See more details on using hashes here.

Supported by

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