Metadata-Version: 2.4
Name: llmworker
Version: 0.1.4
Summary: A lightweight Python toolkit for LLM text and image workflows with Ollama.
Author-email: Sergio Ildefonso <sergio@example.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/sergioildefonso/llmworker
Project-URL: Repository, https://github.com/sergioildefonso/llmworker
Project-URL: Issues, https://github.com/sergioildefonso/llmworker/issues
Keywords: llm,ollama,ai,python,worker
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.32.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: ruff>=0.6.0; extra == "dev"
Dynamic: license-file

# LLMWorker

`LLMWorker` is a minimal Python library to centralize LLM operations behind reusable workers.

## Included Components

- `OllamaClient`: low-level client for Ollama HTTP endpoints.
- `TextWorker`: helper class for text generation/chat style requests.
- `ImageWorker`: helper class for image generation requests.

## Quick Start 
Attention: Need to have Ollama running with the selected models

```bash
bash scripts/bootstrap.sh
python scripts/demo.py
```


## Basic Usage

```python
from llmworker import OllamaClient, TextWorker, ImageWorker

client = OllamaClient(base_url="http://localhost:11434")
text_worker = TextWorker(client, model="llama3.2:3b")
image_worker = ImageWorker(client, model="x/flux2-klein:latest")

answer = text_worker.generate("Explain the origin of universe in one paragraph.")
print(answer)

Example image generation (model must support images)
img_result = image_worker.generate_image("A futuristic city at sunset")
print(img_result)
```
