Skip to main content

Package for generating AI prompts and answers

Project description

Prompt and Answer Generation Tool

This tool generates structured conversations (prompts and answers) based on specified topics using language models.

Quick Start

Installation

Install the package using pip:

pip install mypromptgen

Setup

Configure your environment:

  1. Create .env file from example:
curl -O https://raw.githubusercontent.com/<username>/<repo>/main/.env.example
mv .env.example .env
  1. Add your API keys to .env:
OPENAI_API_KEY=sk-xxx       # For OpenAI
ANTHROPIC_API_KEY=sk-xxx    # For Claude
  1. Configure models and topics in .env:
PROMPTGEN_MODEL=gpt-3.5-turbo
ANSWERGEN_MODEL=gpt-4
TOPICS=Python,JavaScript
AMOUNTS=10

Generate Conversations

Run the main tool:

mypromptgen

Extended Features

Advanced Usage

  1. Distillation Training:
export DATA_FILE=conversations.json
python distill.py
  1. QLoRA Training:
export MODEL_NAME=unsloth/Qwen2.5-Coder-1.5B-Instruct
python qlora.py
  1. Migration:
python migrate.py input.json

Environment Configuration

Key Description
PROMPTGEN_MODEL Model for prompt generation
ANSWERGEN_MODEL Comma-separated answer gen models
TOPICS Comma-separated topic list
AMOUNTS Number of prompts per topic
MODEL_SPLIT Percentage weights for answer models
LOGITS Capture log probabilities (y/n)

Full variable list and detailed documentation at GitHub Repo

PyPI Publishing

  1. Create distribution:
python -m build
  1. Upload to PyPI:
twine upload dist/*

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

mypromptgen-0.3.1.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

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

mypromptgen-0.3.1-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file mypromptgen-0.3.1.tar.gz.

File metadata

  • Download URL: mypromptgen-0.3.1.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for mypromptgen-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c048e6195bb902507be4c097d77561f3d72c777696fd21a56717d12c28a23d73
MD5 f9f675a83edbd459ba43b16123ed89a8
BLAKE2b-256 a0b7037f84854be23c8500ad9875a4e04ad123f0fc41683c0d6a0dbccc62331b

See more details on using hashes here.

File details

Details for the file mypromptgen-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: mypromptgen-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for mypromptgen-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49f6948c5adfcedd5c4e5136b0e5f066a1ec941a52d6af571d6d7d1e172fb962
MD5 1fcdad7147db030bc5450f0c6b20044a
BLAKE2b-256 f7bbdbdcc29e536004d42f3f227437f9d1ebf018e6835dcf22c31f5746ee609c

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