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.0.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.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prompt_as_method-0.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3d58870d1a8d7d771bc8ecea15be67b85e8321b49598c9cf70c66a4208271153
MD5 190fad7834152c2810de2b8b1a47d3d4
BLAKE2b-256 d30c909ed88a9747bb4d7732d815632215b849f9043b52f28e513f25f562a2a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for prompt_as_method-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dcd315e298727158b3f5c2c5a22ea485fe8b7778e4e071c750bb215651aa451
MD5 69f09bd012343c421f81b8ab14e666c1
BLAKE2b-256 ec9a9a86de8d8d35d4f6e8dd6001dc74ff570297d215cbf40c3ff2f5d685ba96

See more details on using hashes here.

Provenance

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