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.3.tar.gz (42.9 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.3-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gptcoder-0.1.3.tar.gz
  • Upload date:
  • Size: 42.9 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.3.tar.gz
Algorithm Hash digest
SHA256 f09c7843b1e3db296e41f25e26f0de33eedf1a881204c76a1580683bee5d8566
MD5 d6b57522e874167a2c5aad2699bd9688
BLAKE2b-256 8fa30a86c5506cd5c70ac0f8602eaf080e7b8b7b18a373ecbd66d6974c8da755

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gptcoder-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2d458446d09afc7e56d5ef1d802cc8293e7e3352f6a3090fce2aee194f6ef533
MD5 354991667ef4fb32ea9dedac0321d09b
BLAKE2b-256 e9e462f0e62aea191ca55b6c789ea951fb1550027f9d39ccfa768275f8141d0d

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