Skip to main content

LLMWorkbook

CodeQL Advanced Quality Scans Tests PyPI Downloads Ruff linter Pylint linter Code Style

"Effortlessly harness the power of LLMs on Excel and DataFrames—seamless, smart, and efficient!"

LLMWorkbook is a Python package designed to seamlessly integrate Large Language Models (LLMs) into your workflow with tabular data, be it Excel, CSV, DataFrames/Arrays. This package allows you to easily configure an LLM, send prompts row-wise from any tabular datasets, and store responses back in the DataFrame with minimal effort.

Documentation Website

Visit our complete documentation site →

For comprehensive guides, examples, and API reference, visit our dedicated documentation website.


Features

  • Easily map LLM responses to a specific column in a pandas DataFrame, Excel, CSV.
  • Run list of prompts easily.
  • Get started with easy to follow Examples

LLMWorkbook v1.4.3 🦦:

✔ New OpenAI Responses Endpoint


Installation

Install the package from GitHub:

    pip install llmworkbook

Quick Start


Wrapper Utilities for LLM Preparation

LLMWorkbook provides wrapper utilities to prepare various data formats for LLM consumption. These utilities transform input data into a format suitable for LLM processing, ensuring consistency and compatibility. These wrapper methods can handle popular data sources like Excel (xlsx), CSV, Pandas DataFrames, multi dimensional arrays.

See Examples for details. - Github - Examples

Providers Supported -


1. Import the Package

import pandas as pd
from llmworkbook import LLMConfig, LLMRunner, LLMDataFrameIntegrator

2. DataFrame

# Provide a dataframe, the usual
df = pd.DataFrame(data)

3. Configure the LLM

config = LLMConfig(
    provider="openai",
    system_prompt="Process these Data rows as per the provided prompt",
    options={
        "model": "gpt-4o-mini",
        "temperature": 1,
        "max_tokens": 1024,
    },
)

4. Create a Runner and Integrate

runner = LLMRunner(config)
integrator = LLMDataFrameIntegrator(runner=runner, df=df)

5. Add LLM Responses to DataFrame

updated_df = integrator.add_llm_responses(
    prompt_column="prompt_text",
    response_column="llm_response",
    async_mode=False  # Set to True for asynchronous requests
)

Example code is available in the Git Repository for easy reference.


Future Roadmap

  • Add support for more LLM providers (Google VertexAI, Cohere, Groq, MistralAI).
  • Add an interface frontend for low code applications.
  • Implement rate-limiting and token usage tracking.
  • Summarized history persisted across session to provide quick context for next session.

Extended Documentation

Detailed documentation for each module is available in the Documentation file.

Links

Homepage Repository Documentation Examples Bug Tracker Issues

Release files for llmworkbook 1.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llmworkbook 1.4.5
File Size Uploaded
llmworkbook-1.4.5.tar.gz 22.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llmworkbook 1.4.5
File Interpreter ABI Platform
llmworkbook-1.4.5-py3-none-any.whl Python 3 none any Details

Total release size: 49.5 kB

Release files / llmworkbook-1.4.5.tar.gz

Download URL llmworkbook-1.4.5.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3f4b85c4aea7cee051706f8d9c8155241a9f1cf586c83b02b6ce835779631d1b
BLAKE2b-256 checksum
How to use checksums
73572979a6cb81fd19d2959ba673d3628edc577f87abafabbbbb1d645641ee2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / llmworkbook-1.4.5-py3-none-any.whl

Download URL llmworkbook-1.4.5-py3-none-any.whl
Size 27.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5e2781271a060596cb705876f5c010a23ee3e13cc3a824d00022d2547fbaf04
BLAKE2b-256 checksum
How to use checksums
0553d32d02170eae501689a1d83cb33671ac25fb073a0dbe0275ea4344a4abe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.4.5 This release

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.2.2

2 release files

0.3.2

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page