Simple interface for creating and managing LLM chains
Project description
LLM-Blocks :building_construction:
LLM-Blocks is a Python library that provides a simple interface for creating and managing Language Learning Model (LLM) chains. It is designed to make it easy to interact with OpenAI's GPT-3.5-turbo model, allowing you to create completions and generate responses in a chat-like format.
:book: Table of Contents
:question: Why Use LLM-Blocks
LLM-Blocks is designed to simplify the process of creating and managing LLM chains. It provides a high-level interface that abstracts away the complexities of interacting with the OpenAI API, allowing you to focus on creating engaging and interactive chat experiences. Whether you're building a chatbot, a virtual assistant, or any other application that requires conversational AI, LLM-Blocks can help you get there faster.
:deciduous_tree: Repo Structure
.
├── .gitignore
├── llm_blocks
│ ├── blocks.py
│ └── __init__.py
├── requirements.txt
├── setup.py
├── test.ipynb
└── turbo_docs.toml
:gear: Installation
LLM-Blocks can be installed via pip:
pip install llm-blocks
:rocket: Usage
Here's an example of how to use the StreamBlock
and BatchBlock
classes in LLM-Blocks:
from llm_blocks import blocks
template = "Hello, {name}!"
# Create a StreamBlock
block = blocks.StreamBlock(template=template)
response_generator = block(name="World")
block.display(response_generator)
# Create a BatchBlock
# Example of how to use the non-defualt model
block = blocks.BatchBlock(template=template, model_name="gpt-4")
response = block(name="World")
block.display(response)
:handshake: Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llm-blocks-0.3.0.tar.gz
.
File metadata
- Download URL: llm-blocks-0.3.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4102a6440850d5c294c183bcdd3fb93e987f208b0586caecc2b1a5a95ea2ffbf |
|
MD5 | bc655574c0b3ea754d6946cd014a7938 |
|
BLAKE2b-256 | 752c198423859c616ec37923c9e7e0888abcaa18ad251eaa05c8778a7eec7cc2 |
File details
Details for the file llm_blocks-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llm_blocks-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2de80ca9552d699188e80175bf61e7b781160894d03923aaa7387e8f3ac85d59 |
|
MD5 | 8d22c96ec01944d2ff135550bacd8933 |
|
BLAKE2b-256 | fd786597771e417d09c4335a49a854ca929f28eec0f84c74bcbed826a7b855a6 |