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.4.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.4.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prompt_as_method-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 9c183e656dfdbe71b06f51c61a0b34cf4081fa8d0f0ed8ff382eb5f2de2c7527
MD5 f36938f7c3874ac9e0b35edca633d651
BLAKE2b-256 26963b9061b2b123cf2e4ad1dc00bd8790a0892977680abacbce83c54d17b6bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for prompt_as_method-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 136f4fffe22c8315a2d92f6a514812fa3ba0843268c72647af2c6c4ec00cf8e6
MD5 cba82f22191a316e9ef41c1a7f4a5f19
BLAKE2b-256 20cb1a72ed83bdfc38578dc4ef8856d9ae000ea4e0b3187da72a8994cc09b8a2

See more details on using hashes here.

Provenance

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