Skip to main content

Plugin for LLM adding a Markov chain generating model

Project description

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

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm-markov-0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

llm_markov-0.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file llm-markov-0.1.tar.gz.

File metadata

  • Download URL: llm-markov-0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for llm-markov-0.1.tar.gz
Algorithm Hash digest
SHA256 1dff3a5c433ccdbc705cf2087cdc173db2a8c785b7761d7fcfb049a0362ec3a3
MD5 93c3353cc0170f1606896de09a38da91
BLAKE2b-256 54c5ad7db3d895e423cf4fdb546e3c58122dbf0b5e335359df04d2e0c34f84a5

See more details on using hashes here.

File details

Details for the file llm_markov-0.1-py3-none-any.whl.

File metadata

  • Download URL: llm_markov-0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for llm_markov-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00512a2a0d7a047961a42a263509f76977971fd4a861753eba7ca2c8095fde7b
MD5 8f181c1bb2cb117eaae3974bcf0343ad
BLAKE2b-256 8b51f54a03ee5b4aac58f714a25940e92864b69a3ca0e264eb5810e613cd848a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page