Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Latest commit

 

History

History
83 lines (58 loc) · 2.33 KB

user.md

File metadata and controls

83 lines (58 loc) · 2.33 KB

User Installation

Use as Application

PyGPTPrompt offers a suite of CLI tools for a range of operations including OCR, PDF-to-Text conversions, model conversions to GGUF, and model quantization to a specified bit depth, and much more!

To use PyGPTPrompt as a standalone suite, install it using:

pip install --user --upgrade git+https://github.com/teleprint-me/py.gpt.prompt.git

Use in Development

To ensure that the dependencies for PyGPTPrompt don't interfere with other Python projects on your system, it's recommended to use a virtual environment. Below are instructions using pipx and poetry:

  1. Install pipx and poetry:

    pip install --user --upgrade pipx
    pipx install poetry
    • Learn more about pipX.

    Alternatively, use virtualenv:

    virtualenv .venv
    source .venv/bin/activate
    pip install git+https://github.com/teleprint-me/py.gpt.prompt.git
    pip freeze > requirements.txt

    Skip to step 3 if you opt for virtualenv.

  2. Initialize, Activate, and Install using poetry:

    poetry init  # follow the prompts
    poetry shell
    poetry add git+https://github.com/teleprint-me/py.gpt.prompt.git
  3. Setup git and .gitignore:

    git init
    curl https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore -o .gitignore
    git add .gitignore  # Optionally add /sessions and /storage if they're local
    git commit -s -m "Initial commit" .gitignore
  4. Setup OpenAI API Key:

    Obtain an API key from the Official OpenAI Platform and set it as an environment variable:

    echo "OPENAI_API_KEY='API_KEY_GOES_HERE'" > .env

    ⚠️ Warning: Never commit .env files to public repositories.

  5. Download and Edit Configuration File:

    curl https://raw.githubusercontent.com/teleprint-me/py.gpt.prompt/main/tests/config.sample.json -o config.json

Summary

These instructions should provide end-users with a comprehensive guide for setting up a virtual environment, installing PyGPTPrompt, and configuring it to work with the OpenAI API.