Metadata-Version: 2.4
Name: parallm
Version: 0.1.2
Summary: CLI tool for querying multiple models with prompts from a CSV
Author-email: Rohit Krishnan <rohit.krishnan@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Rohit
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/strangeloopcanon/parallm
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: bodo==2025.3.3
Requires-Dist: llm==0.23
Requires-Dist: pandas==2.2.3
Requires-Dist: python-dotenv==1.1.0

# ParaLLM
ParaLLM is a command-line tool that queries multiple language models using prompts read from a CSV file. It efficiently creates a Cartesian product of your prompts and model names, sends them to the models, and outputs the responses as a CSV file.

## Features

- **Multi-Model Querying:** Easily query several models in one go.
- **CSV Input/Output:** Use CSV files to manage your prompts and capture responses.
- **Simple CLI Interface:** Run your queries directly from the terminal.

## Installation

```bash
pip install parallm
```

Or clone the repository and install the package locally:

```bash
git clone https://github.com/strangeloopcanon/parallm.git
cd parallm
pip install e .
```
You would also need to install SimonW's llm package, and set up the keys.

## Usage
Once installed, you can use the `parallm` command from your terminal. For example:

```bash
parallm --prompts path/to/prompts.csv --models gpt-4o gemini-2.5-pro-exp-03-25 claude-3.7-sonnet
```
**Python API**: After you install, you can, for instance, run this in a python script.
```bash
from parallm import query_model_all

df = query_model_all("data/prompts.csv", ["gpt-4", "gemini-2.0-flash"])
print(df)
```

This command:
- Reads the prompts from the specified CSV file (the file should have a header named `prompt`).
- Creates a query for each combination of prompt and provided model names.
- Outputs a CSV with columns for `prompt`, `model`, and `response`.
- It will save the output into 'output.csv'

## CSV Format
Your `prompts.csv` file should have a header as "prompt". Example:

```csv
prompt
Hello, world!
Tell me a joke.
```

## Dependencies
ParaLLM relies on the following Python packages:
- **pandas**
- **python-dotenv**
- **bodo**
- **llm**

These dependencies are automatically installed when you install ParaLLM.

## Author
Rohit Krishnan
