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.5.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.5-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gptcoder-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 92d8b66b1b25e18596ccebe00368f3f6fd7bc191f6a79abb576a391725150f04
MD5 744e2af092ba932066ad1b13ad3d79a5
BLAKE2b-256 d9a658142b4eadfb9aa6581c2ae5bb1da3e1b842cd964b8a0ac12d642b5a0ad8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gptcoder-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 19f30c7b3c82b6e8d75b5829e20451ebfad7676a49965c4ee22c6b251d768426
MD5 e00c52b2b2c280e209942fb3fb027ce1
BLAKE2b-256 1da8541e3267e621a449fc60102fb527b9c3d09fbbea7f6bf20c60ab8624081e

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