Skip to main content

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

from mattsollamatools import chunker

textchunks = chunker(text, max_words_per_chunk=110, language='spanish')

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

Release files for mattsollamatools 0.0.25

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

Source distribution (sdist)

Source distribution for mattsollamatools 0.0.25
File Size Uploaded
mattsollamatools-0.0.25.tar.gz 3.1 kB Details

Built distribution (wheel)

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

Total release size: 6.8 kB

Release files / mattsollamatools-0.0.25.tar.gz

Download URL mattsollamatools-0.0.25.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9b46af73c52eb3d1656c651423ebd11da5aadce148f2931b882edb6c0031f774
BLAKE2b-256 checksum
How to use checksums
8ddf483b56638c619b140e00102ee794869ebf858405fc46062de06c99e01e10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.9

Release files / mattsollamatools-0.0.25-py3-none-any.whl

Download URL mattsollamatools-0.0.25-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6d32eb65217006faff58591b4187c086047f3ade998b0539d0b6807b7b13533
BLAKE2b-256 checksum
How to use checksums
2ba736590304bee11ef4fa64f2c36b49f857a633751fe7622e0af8dfa1aa0ce8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.0.25 This release

2 release files

0.0.19

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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