llmworkbook


Namellmworkbook JSON
Version 0.1.8 PyPI version JSON
download
home_pageNone
SummaryEffortlessly harness the power of LLMs on Excel and DataFrames—seamless, smart, and efficient!
upload_time2025-02-07 12:37:15
maintainerNone
docs_urlNone
authordhruv
requires_python<4.0,>=3.11
licenseMIT
keywords llm dataframe excel workbook excel csv openai ollama gpt4all python async
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # **LLMWorkbook**

[![CodeQL Advanced](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/codeql.yml/badge.svg)](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/codeql.yml)
[![Quality Scans](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/Quality%20Check.yml/badge.svg)](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/Quality%20Check.yml)
[![Tests](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/test.yml/badge.svg)](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/test.yml)
[![PyPI Downloads](https://static.pepy.tech/badge/llmworkbook)](https://pepy.tech/projects/llmworkbook)
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff linter" href="https://github.com/astral-sh/ruff" />
<img src="https://img.shields.io/badge/linting-pylint-yellowgreen" alt="Pylint linter" href="https://github.com/pylint-dev/pylint" />  <img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style" href="https://github.com/ambv/black" />

"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.

---

## **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

---

## **Installation**

Install the package from GitHub:

```bash
    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](https://github.com/aryadhruv/LLMWorkbook/tree/main/Examples)*

### Providers Supported -
* [OpenAI](docs/Providers/OpenAI.md)
* [Gpt4All](docs/Providers/Gpt4All.md)
* [Ollama](docs/Providers/Ollama.md)


---

### **1. Import the Package**

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

### **2. DataFrame**

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

### **3. Configure the LLM**

```python
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**

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

### **5. Add LLM Responses to DataFrame**

```python
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 (Anthropic Claude, 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](docs) file.
- [Wrapping Data](docs/wrapping.md) file.
- [Providers](docs/Providers/) -
    [OpenAI](docs/Providers/OpenAI.md)
    [Gpt4All](docs/Providers/Gpt4All.md)
    [Ollama](docs/Providers/Ollama.md)
- [CLI Useage](docs/CLI%20Usage.md) file.



## **Links**

[Homepage](https://github.com/aryadhruv/LLMWorkbook)
[Repository](https://github.com/aryadhruv/LLMWorkbook)
[Documentation](https://github.com/aryadhruv/LLMWorkbook/tree/main/Docs)
[Examples](https://github.com/aryadhruv/LLMWorkbook/tree/main/Examples)
[Bug Tracker](https://github.com/aryadhruv/LLMWorkbook/issues)
[Issues](https://github.com/aryadhruv/LLMWorkbook/issues)




            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llmworkbook",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "LLM, DataFrame, Excel Workbook, Excel, CSV, OpenAI, Ollama, Gpt4all, Python, async",
    "author": "dhruv",
    "author_email": "dhruv166arya@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e5/c5/6fbe51378bfd34ab91a91697b6b0c453b47b0b81898b0cfee54ba3b1651e/llmworkbook-0.1.8.tar.gz",
    "platform": null,
    "description": "# **LLMWorkbook**\n\n[![CodeQL Advanced](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/codeql.yml/badge.svg)](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/codeql.yml)\n[![Quality Scans](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/Quality%20Check.yml/badge.svg)](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/Quality%20Check.yml)\n[![Tests](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/test.yml/badge.svg)](https://github.com/aryadhruv/LLMWorkbook/actions/workflows/test.yml)\n[![PyPI Downloads](https://static.pepy.tech/badge/llmworkbook)](https://pepy.tech/projects/llmworkbook)\n<img src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\" alt=\"Ruff linter\" href=\"https://github.com/astral-sh/ruff\" />\n<img src=\"https://img.shields.io/badge/linting-pylint-yellowgreen\" alt=\"Pylint linter\" href=\"https://github.com/pylint-dev/pylint\" />  <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Code Style\" href=\"https://github.com/ambv/black\" />\n\n\"Effortlessly harness the power of LLMs on Excel and DataFrames\u2014seamless, smart, and efficient!\"\n\n**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.\n\n---\n\n## **Features**\n- Easily map LLM responses to a specific column in a pandas DataFrame, Excel, CSV.\n- Run list of prompts easily.\n- Get started with easy to follow Examples\n\n---\n\n## **Installation**\n\nInstall the package from GitHub:\n\n```bash\n    pip install llmworkbook\n```\n\n---\n\n## **Quick Start**\n\n---\n\n### **Wrapper Utilities for LLM Preparation**\n\n`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.\nThese wrapper methods can handle popular data sources like Excel (xlsx), CSV, Pandas DataFrames, multi dimensional arrays.\n\n*See Examples for details. - [Github - Examples](https://github.com/aryadhruv/LLMWorkbook/tree/main/Examples)*\n\n### Providers Supported -\n* [OpenAI](docs/Providers/OpenAI.md)\n* [Gpt4All](docs/Providers/Gpt4All.md)\n* [Ollama](docs/Providers/Ollama.md)\n\n\n---\n\n### **1. Import the Package**\n\n```python\nimport pandas as pd\nfrom llmworkbook import LLMConfig, LLMRunner, LLMDataFrameIntegrator\n```\n\n### **2. DataFrame**\n\n```python\n# Provide a dataframe, the usual\ndf = pd.DataFrame(data)\n```\n\n### **3. Configure the LLM**\n\n```python\nconfig = LLMConfig(\n    provider=\"openai\",\n    system_prompt=\"Process these Data rows as per the provided prompt\",\n    options={\n        \"model\": \"gpt-4o-mini\",\n        \"temperature\": 1,\n        \"max_tokens\": 1024,\n    },\n)\n```\n\n### **4. Create a Runner and Integrate**\n\n```python\nrunner = LLMRunner(config)\nintegrator = LLMDataFrameIntegrator(runner=runner, df=df)\n```\n\n### **5. Add LLM Responses to DataFrame**\n\n```python\nupdated_df = integrator.add_llm_responses(\n    prompt_column=\"prompt_text\",\n    response_column=\"llm_response\",\n    async_mode=False  # Set to True for asynchronous requests\n)\n\n```\n\nExample code is available in the Git Repository for easy reference.\n\n---\n## **Future Roadmap**\n\n- Add support for more LLM providers (Anthropic Claude, Google VertexAI, Cohere, Groq, MistralAI).\n- Add an interface frontend for low code applications.\n- Implement rate-limiting and token usage tracking.\n- Summarized history persisted across session to provide quick context for next session.\n\n\n## Extended Documentation\n\nDetailed documentation for each module is available in the [Documentation](docs) file.\n- [Wrapping Data](docs/wrapping.md) file.\n- [Providers](docs/Providers/) -\n    [OpenAI](docs/Providers/OpenAI.md)\n    [Gpt4All](docs/Providers/Gpt4All.md)\n    [Ollama](docs/Providers/Ollama.md)\n- [CLI Useage](docs/CLI%20Usage.md) file.\n\n\n\n## **Links**\n\n[Homepage](https://github.com/aryadhruv/LLMWorkbook)\n[Repository](https://github.com/aryadhruv/LLMWorkbook)\n[Documentation](https://github.com/aryadhruv/LLMWorkbook/tree/main/Docs)\n[Examples](https://github.com/aryadhruv/LLMWorkbook/tree/main/Examples)\n[Bug Tracker](https://github.com/aryadhruv/LLMWorkbook/issues)\n[Issues](https://github.com/aryadhruv/LLMWorkbook/issues)\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Effortlessly harness the power of LLMs on Excel and DataFrames\u2014seamless, smart, and efficient!",
    "version": "0.1.8",
    "project_urls": {
        "Documentation": "https://github.com/aryadhruv/LLMWorkbook",
        "Homepage": "https://github.com/aryadhruv/LLMWorkbook",
        "Issues": "https://github.com/aryadhruv/LLMWorkbook/issues",
        "Repository": "https://github.com/aryadhruv/LLMWorkbook"
    },
    "split_keywords": [
        "llm",
        " dataframe",
        " excel workbook",
        " excel",
        " csv",
        " openai",
        " ollama",
        " gpt4all",
        " python",
        " async"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7084ccab26cc2569ffc2d2ab8922c3a908dcd463d098da8ecd041fed8ce9fbba",
                "md5": "a419834dc69cadb790d773e89e7d1132",
                "sha256": "6203a87458476e8713dcbcbc6af11ec55af07bdec2101e1b4c2ec427d580b58e"
            },
            "downloads": -1,
            "filename": "llmworkbook-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a419834dc69cadb790d773e89e7d1132",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 21111,
            "upload_time": "2025-02-07T12:37:14",
            "upload_time_iso_8601": "2025-02-07T12:37:14.193287Z",
            "url": "https://files.pythonhosted.org/packages/70/84/ccab26cc2569ffc2d2ab8922c3a908dcd463d098da8ecd041fed8ce9fbba/llmworkbook-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e5c56fbe51378bfd34ab91a91697b6b0c453b47b0b81898b0cfee54ba3b1651e",
                "md5": "20c38e7ae2979e4447b1a5e9c0fc4ee8",
                "sha256": "a6b89c48ee7e10df0145e2d373af8c64edf01de286a2504d030ef0917d771134"
            },
            "downloads": -1,
            "filename": "llmworkbook-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "20c38e7ae2979e4447b1a5e9c0fc4ee8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 17817,
            "upload_time": "2025-02-07T12:37:15",
            "upload_time_iso_8601": "2025-02-07T12:37:15.510664Z",
            "url": "https://files.pythonhosted.org/packages/e5/c5/6fbe51378bfd34ab91a91697b6b0c453b47b0b81898b0cfee54ba3b1651e/llmworkbook-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-07 12:37:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aryadhruv",
    "github_project": "LLMWorkbook",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "llmworkbook"
}
        
Elapsed time: 0.53699s