A Python package for generating questions and answers using various LLM providers.
Project description
QAGeneratorLLM
A Python package for generating questions and answers using various LLM providers.
Features
- Support for multiple LLM providers (Anthropic, Ollama, OpenAI, XAI)
- Generate both Multiple Choice Questions (MCQ) and Question-Answer (QA) pairs
- Structured output using Pydantic models
- Batch processing support
- File-based context input
Installation
pip install qageneratorllm
Usage
from qageneratorllm import ChatLLM, ChatLLMType, QuestionType
# Initialize with default settings (Ollama + QA format)
llm = ChatLLM()
# Generate QA from text
result = llm.invoke("Your context text here")
# Generate MCQ using OpenAI
llm = ChatLLM(chat_type=ChatLLMType.OPENAI, question_type=QuestionType.MCQ)
result = llm.invoke("Your context text here")
# Generate from file
result = llm.invoke_from_file("path/to/your/file.txt")
Environment Variables
ANTHROPIC_MODEL_NAME: Anthropic model name (default: claude-3-sonnet-20240229)OLLAMA_MODEL_NAME: Ollama model name (default: deepseek-r1)OPENAI_MODEL_NAME: OpenAI model name (default: gpt-4)XAI_MODEL_NAME: XAI model name (default: grok-beta)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 qageneratorllm-0.0.1.tar.gz.
File metadata
- Download URL: qageneratorllm-0.0.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
235d4c7acdbfd7e9d632faa6c685a2d83df47163b6f00abb49762fc875a2634c
|
|
| MD5 |
a29efeb5fb839884323629b8079014ce
|
|
| BLAKE2b-256 |
9632c57e97987f173ab595afc014b98f76aadf8ca1724ea6fc3acf721e04399c
|
Provenance
The following attestation bundles were made for qageneratorllm-0.0.1.tar.gz:
Publisher:
python-publish.yml on KameniAlexNea/create-dataset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qageneratorllm-0.0.1.tar.gz -
Subject digest:
235d4c7acdbfd7e9d632faa6c685a2d83df47163b6f00abb49762fc875a2634c - Sigstore transparency entry: 180719220
- Sigstore integration time:
-
Permalink:
KameniAlexNea/create-dataset@1a3d6efc0bb834c2721fc07e850ee9fbd4ce1fc0 -
Branch / Tag:
refs/tags/qageneratorllm-v0.0.1 - Owner: https://github.com/KameniAlexNea
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1a3d6efc0bb834c2721fc07e850ee9fbd4ce1fc0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qageneratorllm-0.0.1-py3-none-any.whl.
File metadata
- Download URL: qageneratorllm-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4381110fb97bf309f977b9063478db8f1233c9287ab98b2de2cf52723ed6761c
|
|
| MD5 |
a779ccce13c293c0b0d0cde1f6a74ee8
|
|
| BLAKE2b-256 |
8120f981438d6c4c69b7ffd75a7143039b2c1e2281c340dd62c36c77ac5d456b
|
Provenance
The following attestation bundles were made for qageneratorllm-0.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on KameniAlexNea/create-dataset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qageneratorllm-0.0.1-py3-none-any.whl -
Subject digest:
4381110fb97bf309f977b9063478db8f1233c9287ab98b2de2cf52723ed6761c - Sigstore transparency entry: 180719222
- Sigstore integration time:
-
Permalink:
KameniAlexNea/create-dataset@1a3d6efc0bb834c2721fc07e850ee9fbd4ce1fc0 -
Branch / Tag:
refs/tags/qageneratorllm-v0.0.1 - Owner: https://github.com/KameniAlexNea
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1a3d6efc0bb834c2721fc07e850ee9fbd4ce1fc0 -
Trigger Event:
release
-
Statement type: