Skip to main content

Run prompts from files

Project description

Prompt-as-Method

PyPI - Version Python Version from PEP 621 TOML GitHub Actions Workflow Status Static Badge

Run prompts from files.

Install

pip install prompt-as-method

Quickstart

If you have an Ollama running on the default port on your local machine:

ollama pull llama3.1  # download model
python3 -m prompt_as_method \
    --prompt examples/sentiment/prompt.json \
    --data examples/sentiment/data.csv

This runs the prompt template examples/sentiment/prompt.json for each row of examples/sentiment/data.csv with {{{text}}} replaced by the row's value for it.

Contributing

See the development notes.

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

prompt_as_method-0.2.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

prompt_as_method-0.2.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file prompt_as_method-0.2.0.tar.gz.

File metadata

  • Download URL: prompt_as_method-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for prompt_as_method-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c64dd29c34f4f4d7109a2e5211904da5875506f12bc24c267395bbdc4de8f72a
MD5 6452f1c2fc7f020378f31190f387452a
BLAKE2b-256 b6dad63aa3464f6e8c9f4448d13f1a6a6e0149bebc505972b5c68ab4fba4d3b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_as_method-0.2.0.tar.gz:

Publisher: publish.yml on GESIS-Methods-Hub/prompt-as-method

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompt_as_method-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prompt_as_method-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3dbc8d0a18fc016fcb505365785bf984631847f6c50217f569010d5897289421
MD5 fc4bcc65f36c418fa3be7cb7412132cc
BLAKE2b-256 8d94b8b0707aeef37286661a30a9292248a8fbad486be5a204d5655714d85deb

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_as_method-0.2.0-py3-none-any.whl:

Publisher: publish.yml on GESIS-Methods-Hub/prompt-as-method

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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