llm-markov


Namellm-markov JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/simonw/llm-markov
SummaryPlugin for LLM adding a Markov chain generating model
upload_time2023-07-12 14:39:11
maintainer
docs_urlNone
authorSimon Willison
requires_python>=3.7
licenseApache License, Version 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # llm-markov

[![PyPI](https://img.shields.io/pypi/v/llm-markov.svg)](https://pypi.org/project/llm-markov/)
[![Changelog](https://img.shields.io/github/v/release/simonw/llm-markov?include_prereleases&label=changelog)](https://github.com/simonw/llm-markov/releases)
[![Tests](https://github.com/simonw/llm-markov/workflows/Test/badge.svg)](https://github.com/simonw/llm-markov/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/llm-markov/blob/main/LICENSE)

Plugin for [LLM](https://llm.datasette.io/) adding a [Markov chain](https://en.wikipedia.org/wiki/Markov_chain) generating model

## Installation

Install this plugin in the same environment as LLM.
```bash
llm install llm-markov
```
## Usage

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

```bash
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:

```bash
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:

```bash
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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/simonw/llm-markov",
    "name": "llm-markov",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Simon Willison",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/54/c5/ad7db3d895e423cf4fdb546e3c58122dbf0b5e335359df04d2e0c34f84a5/llm-markov-0.1.tar.gz",
    "platform": null,
    "description": "# llm-markov\n\n[![PyPI](https://img.shields.io/pypi/v/llm-markov.svg)](https://pypi.org/project/llm-markov/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/llm-markov?include_prereleases&label=changelog)](https://github.com/simonw/llm-markov/releases)\n[![Tests](https://github.com/simonw/llm-markov/workflows/Test/badge.svg)](https://github.com/simonw/llm-markov/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/llm-markov/blob/main/LICENSE)\n\nPlugin for [LLM](https://llm.datasette.io/) adding a [Markov chain](https://en.wikipedia.org/wiki/Markov_chain) generating model\n\n## Installation\n\nInstall this plugin in the same environment as LLM.\n```bash\nllm install llm-markov\n```\n## Usage\n\nThis plugin adds a model called `markov`. You can execute it like this:\n\n```bash\nllm -m markov \"The quick brown fox jumps over the lazy dog\"\n```\n\nMy default it will produce 100 words. You can control the number of words with the `-o number` option:\n\n```bash\nllm -m markov -o 20 \"The quick brown fox jumps over the lazy dog\"\n```\nA 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:\n\n```bash\nllm -m markov \"The quick brown fox jumps over the lazy dog\" -o delay 0\nllm -m markov \"The quick brown fox jumps over the lazy dog\" -o delay 0.1 -o length 20\n```\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n    cd llm-markov\n    python3 -m venv venv\n    source venv/bin/activate\n\nNow install the dependencies and test dependencies:\n\n    pip install -e '.[test]'\n\nTo run the tests:\n\n    pytest\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "Plugin for LLM adding a Markov chain generating model",
    "version": "0.1",
    "project_urls": {
        "CI": "https://github.com/simonw/llm-markov/actions",
        "Changelog": "https://github.com/simonw/llm-markov/releases",
        "Homepage": "https://github.com/simonw/llm-markov",
        "Issues": "https://github.com/simonw/llm-markov/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8b51f54a03ee5b4aac58f714a25940e92864b69a3ca0e264eb5810e613cd848a",
                "md5": "8f181c1bb2cb117eaae3974bcf0343ad",
                "sha256": "00512a2a0d7a047961a42a263509f76977971fd4a861753eba7ca2c8095fde7b"
            },
            "downloads": -1,
            "filename": "llm_markov-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8f181c1bb2cb117eaae3974bcf0343ad",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7156,
            "upload_time": "2023-07-12T14:39:09",
            "upload_time_iso_8601": "2023-07-12T14:39:09.885624Z",
            "url": "https://files.pythonhosted.org/packages/8b/51/f54a03ee5b4aac58f714a25940e92864b69a3ca0e264eb5810e613cd848a/llm_markov-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54c5ad7db3d895e423cf4fdb546e3c58122dbf0b5e335359df04d2e0c34f84a5",
                "md5": "93c3353cc0170f1606896de09a38da91",
                "sha256": "1dff3a5c433ccdbc705cf2087cdc173db2a8c785b7761d7fcfb049a0362ec3a3"
            },
            "downloads": -1,
            "filename": "llm-markov-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "93c3353cc0170f1606896de09a38da91",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7206,
            "upload_time": "2023-07-12T14:39:11",
            "upload_time_iso_8601": "2023-07-12T14:39:11.330801Z",
            "url": "https://files.pythonhosted.org/packages/54/c5/ad7db3d895e423cf4fdb546e3c58122dbf0b5e335359df04d2e0c34f84a5/llm-markov-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 14:39:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simonw",
    "github_project": "llm-markov",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "llm-markov"
}
        
Elapsed time: 0.36138s