Tools for working with Ollama
Project description
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.
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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mattsollamatools-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 034b915bb38a537259e7ad522759911c528dc417c5e7076a1f759db66adda154 |
|
MD5 | f4c8dcfab466f6f3c92344ef919d366c |
|
BLAKE2b-256 | ff3dbf16b88135669800f29160ad02aa0fe16ba7afc20d120af767d2a83aadc0 |