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.1.tar.gz (7.9 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.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rompt-1.0.1.tar.gz
  • Upload date:
  • Size: 7.9 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.1.tar.gz
Algorithm Hash digest
SHA256 8001495b99ae0b6c7ab0ae61ae3b7227888d8a0d45f4902fe610d4e986f7e715
MD5 3af33543e46e567f220ab481295d83fe
BLAKE2b-256 235d6677752a54f53abbfd2c40bccaf247d13c873d60f1c70895df50176c8810

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rompt-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb225bd1045437a5ce87702d516a5b8ffeee0590d059938d29868a14fb6b29d0
MD5 1d9760b8e70a68956f320f843e8573c8
BLAKE2b-256 1b61f592f14b2b3f23b6839d867086861d903910dea05ce8e75d604098e4f6c1

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