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

Uploaded Python 3

File details

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

File metadata

  • Download URL: prompt_as_method-0.3.1.tar.gz
  • Upload date:
  • Size: 6.1 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.3.1.tar.gz
Algorithm Hash digest
SHA256 6aa6a7e6551fa85f7c381680a7d18d7c610ae487ab18f6dc4918918cea0f2311
MD5 697ff50b3f6fa457c3d4d85d7a97c3c5
BLAKE2b-256 222a71cb82af9de3ba4bbd09923ae8537732cf052f89f625a3391915c6b35aa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_as_method-0.3.1.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.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for prompt_as_method-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96cf72cd9be7882d712e26e9439b806ac161c4d598c6181b1dcd9a9e237d84f6
MD5 5221f61e44675f8ff60628a14f570dc1
BLAKE2b-256 32716f8ff8f9deccf33c521b3cff46753065d2eb4a15607e8e06fcd4eb3d933f

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_as_method-0.3.1-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