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:
- Create
.envfile from example:
curl -O https://raw.githubusercontent.com/<username>/<repo>/main/.env.example
mv .env.example .env
- Add your API keys to
.env:
OPENAI_API_KEY=sk-xxx # For OpenAI
ANTHROPIC_API_KEY=sk-xxx # For Claude
- 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
- Distillation Training:
export DATA_FILE=conversations.json
python distill.py
- QLoRA Training:
export MODEL_NAME=unsloth/Qwen2.5-Coder-1.5B-Instruct
python qlora.py
- 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
- Create distribution:
python -m build
- 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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c048e6195bb902507be4c097d77561f3d72c777696fd21a56717d12c28a23d73
|
|
| MD5 |
f9f675a83edbd459ba43b16123ed89a8
|
|
| BLAKE2b-256 |
a0b7037f84854be23c8500ad9875a4e04ad123f0fc41683c0d6a0dbccc62331b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49f6948c5adfcedd5c4e5136b0e5f066a1ec941a52d6af571d6d7d1e172fb962
|
|
| MD5 |
1fcdad7147db030bc5450f0c6b20044a
|
|
| BLAKE2b-256 |
f7bbdbdcc29e536004d42f3f227437f9d1ebf018e6835dcf22c31f5746ee609c
|