Skip to main content

Python library to interact with the Rompt API and CLI.

Project description


Rompt.ai Python Library


Rompt streamlines your workflow, improves collaboration, enhances GPT model performance, and provides seamless integration with its CLI tool and output format support.

Features

  • Version control and changelog on prompts
  • Generate prompts from template strings
  • Pull prompts from Rompt into your codebase

Installation

Install the client & CLI library:

pip install rompt

Pull your prompts into your codebase using the CLI:

rompt pull --token {YOUR_TOKEN}

Usage

To use the library, you'll first need to import it:

from rompt import generate

generated_with_metadata = generate(
  prompt_name="your-prompt-name",
  template_object={
    NAME: "Michael",
    DIRECTION: "Generate a Tweet"
  },
)

prompt = generated_with_metadata.get('prompt')
# Your result is now in the prompt variable

Track History

from rompt import generate, track

# ...continued from above

track(generated_with_metadata)

# Your GPT responses can be included; example with OpenAI:

const gpt_response = openai.Completion.create({
  prompt=prompt,
  #...
})

track(generated_with_metadata, gpt_response)

Documentation

For detailed documentation, including API references and more examples, please visit the the Rompt.ai website.

Contributing

We welcome contributions to the Rompt Node.js library. If you'd like to contribute, please submit a pull request on GitHub.

License

This project is licensed under the MIT License. For more information, please see the LICENSE file.

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

rompt-1.0.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

rompt-1.0.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file rompt-1.0.0.tar.gz.

File metadata

  • Download URL: rompt-1.0.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for rompt-1.0.0.tar.gz
Algorithm Hash digest
SHA256 15e60e48e7b03cf24a624dc015332585499addeda45d8795615b5003409e7b56
MD5 6fab00fae9fe444117111bbb1c83f8f3
BLAKE2b-256 6423eeea50bc67ecd2fef8a7f37ffff7c74a2c2193171d5b6fb400c73f7cb557

See more details on using hashes here.

File details

Details for the file rompt-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rompt-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for rompt-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09fac8c3ed3e1bee87954eea2112a2003ec1eb5273dee05751fa0710cfa353b9
MD5 3d902f87a41f76c492e231a05633845c
BLAKE2b-256 a66017bd9aec53e765033919a49397bd8c1f86a68435121665a3783945a653b0

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