Skip to main content

Simple interface for creating and managing LLM chains

Project description

LLM-Blocks :chains:

GitHub stars PyPI version

LLM-Blocks is a Python library that provides a simple interface for creating and managing Language Learning Model (LLM) chains. It leverages the power of OpenAI's GPT-3.5-turbo to generate chat-like completions.

:book: Table of Contents

:rocket: Why Use LLM-Blocks

LLM-Blocks stands out from the crowd by providing a super simple interface for creating and managing LLM chains. It's perfect for developers who want to leverage the power of GPT-3.5-turbo without getting into the complexities of managing the model. With LLM-Blocks, you can create GPT completions and stream or batch outputs with ease.

:file_folder: Repo Structure

.
├── .gitignore
├── .env
├── llm_blocks
│   ├── chat_utils.py
│   └── __init__.py
├── requirements.txt
├── setup.py
└── turbo_docs.toml

:wrench: Installation

To install LLM-Blocks, run the following command:

pip install llm-blocks

:computer: Example Usage

Here's a simple example of how to use the GenericChain class in LLM-Blocks:

from llm_blocks.chat_utils import GenericChain

# Initialize the GenericChain class
chain = GenericChain(template="Hello, {name}!")

# Call the model with the given inputs
response = chain(name="John Doe")

# Print the response
print(response)

In this example, the GenericChain class is initialized with a template. The model is then called with the given inputs, and the response is printed.

:heart: Support

If you like this project, please give it a :star: on GitHub!

Project details


Download files

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

Source Distribution

llm-blocks-0.2.5.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

llm_blocks-0.2.5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file llm-blocks-0.2.5.tar.gz.

File metadata

  • Download URL: llm-blocks-0.2.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for llm-blocks-0.2.5.tar.gz
Algorithm Hash digest
SHA256 1a9d4053c061e257a251cb346e3e092712cc78cc8a5aa0362951cf3b2a765c15
MD5 26e40bd8bacbaa5f79cdd9a17b4f37be
BLAKE2b-256 4a370d5700161163cf11bd5d218856890763e991c4d8a687c87f81634284be85

See more details on using hashes here.

File details

Details for the file llm_blocks-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: llm_blocks-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for llm_blocks-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 43aabb8b928b0d0511648713e6c668f6b7f67791963faf69a9221601a9685d7f
MD5 636f23cc709a249931e44d93c3909347
BLAKE2b-256 3b180b7b4032384d147c16a62846381cff8e1d1a2a906d13fc90c6f739a2b9e6

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