Skip to main content

llm-markov

PyPI Changelog Tests License

Plugin for LLM adding a Markov chain generating model

Installation

Install this plugin in the same environment as LLM.

llm install llm-markov

Usage

This plugin adds a model called markov. You can execute it like this:

llm -m markov "The quick brown fox jumps over the lazy dog"

My default it will produce 100 words. You can control the number of words with the -o number option:

llm -m markov -o 20 "The quick brown fox jumps over the lazy dog"

A delay of 0.02s is simulated between each token. You can modify this using the -o delay option - to 0 to disable it, or some other floating point number of seconds to customize it:

llm -m markov "The quick brown fox jumps over the lazy dog" -o delay 0
llm -m markov "The quick brown fox jumps over the lazy dog" -o delay 0.1 -o length 20

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-markov
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Release files for llm-markov 0.1

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

Source distribution (sdist)

Source distribution for llm-markov 0.1
File Size Uploaded
llm-markov-0.1.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-markov 0.1
File Interpreter ABI Platform
llm_markov-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / llm-markov-0.1.tar.gz

Download URL llm-markov-0.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1dff3a5c433ccdbc705cf2087cdc173db2a8c785b7761d7fcfb049a0362ec3a3
BLAKE2b-256 checksum
How to use checksums
54c5ad7db3d895e423cf4fdb546e3c58122dbf0b5e335359df04d2e0c34f84a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / llm_markov-0.1-py3-none-any.whl

Download URL llm_markov-0.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00512a2a0d7a047961a42a263509f76977971fd4a861753eba7ca2c8095fde7b
BLAKE2b-256 checksum
How to use checksums
8b51f54a03ee5b4aac58f714a25940e92864b69a3ca0e264eb5810e613cd848a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

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