Skip to content

GESIS-Methods-Hub/prompt-as-method

Repository files navigation

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.

About

Run prompts from files

Resources

License

Stars

Watchers

Forks

Packages

No packages published