Metadata-Version: 2.1
Name: mattsollamatools
Version: 0.0.21
Summary: Tools for working with Ollama
Author-email: Matt Williams <m@technovangelist.com>
Project-URL: Homepage, https://technovangelist.com
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.md

# Matt's Ollama Tools

I needed some simple tools to make it easier to work with integrating Ollama with the real world. This is a collection of those tools.

## Chunker

Sometimes you need to take a bunch of text in and then spit it out in an array of chunks. This will take in a long text and then split it into chunks of up to a defined number of words. It won't ever get sentence fragments. It will overlap each chunk by one sentence. If you have a text with a bunch of poorly written run-on sentences, this might not work.

### Usage

```python
from mattsollamatools import chunker

textchunks = chunker(text, max_words_per_chunk=110)
```

If you don't include max_words_per_chunk, it will default to 100.
