Skip to main content

Promptia

Promptia is a Python library designed to streamline the management and generation of prompts for Large Language Models (LLMs).

Features

  • Manage prompt templates for various LLMs and APIs
  • Convert abstract templates to specific API formats
  • Support for function calling with detailed configurations
  • Version control for templates
  • Dynamic information embedding using Retrieval-Augmented Generation (RAG)
  • Modular design for flexibility and extensibility

Installation

pip install promptia[openai]

Quick Start

from promptia import Promptia
from promptia import PromptTemplate
from promptia import Message
from promptia.llm.openai import OpenAIGPT4oMini

template = PromptTemplate(
    name='greeting',
    description='greeting template',
    system="Your name is {{name}}. You have wandered into {{place}}. Please act.",
    messages=[
        Message(role='user', content='Who are you?'),
    ],
    parameters={
        'name': 'string',
        'place': 'string'
    },
    function_calling_config=None
)
tia = Promptia()
prompt = tia.build(template, {"name": "Alice", "place": "Wonderland"})

llm = OpenAIGPT4oMini()
result = llm.call_llm(prompt)
print(result)

Contributing

We welcome contributions! Please see our Contributing Guidelines for more details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for promptia 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for promptia 0.5.1
File Size Uploaded Provenance Actions
promptia-0.5.1.tar.gz 8.2 kB Without provenance Details for promptia-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for promptia 0.5.1
File Interpreter ABI Platform Actions
promptia-0.5.1-py3-none-any.whl Python 3 none any Details for promptia-0.5.1-py3-none-any.whl

Total release size: 21.5 kB

Release files / promptia-0.5.1.tar.gz

Download URL promptia-0.5.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3e0d9509e10896e5b6e01f28acd25e7b04ee3ff3e926084ab067fc09c86b7f26
BLAKE2b-256 checksum
How to use checksums
20cdac24410d5afd9ead6721532ccdfe5057978de0644543256d0b15b4ac6646
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/5.15.136-tegra

Release files / promptia-0.5.1-py3-none-any.whl

Download URL promptia-0.5.1-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
054fbfaa272f4b6bd6ea7a75feb304f4f06911963bc6f90b1bfa6cc0bcf6fe17
BLAKE2b-256 checksum
How to use checksums
753a014bf5e3baad533ccac78d9270a35844907a3f79347b6a2f935b8539cb2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/5.15.136-tegra

Security for promptia 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page