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.
Metadata
Release files for llm-blocks 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm-blocks-0.3.0.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_blocks-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / llm-blocks-0.3.0.tar.gz
| Download URL | llm-blocks-0.3.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4102a6440850d5c294c183bcdd3fb93e987f208b0586caecc2b1a5a95ea2ffbf
|
|
BLAKE2b-256 checksum How to use checksums |
752c198423859c616ec37923c9e7e0888abcaa18ad251eaa05c8778a7eec7cc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.1
|
Release files / llm_blocks-0.3.0-py3-none-any.whl
| Download URL | llm_blocks-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2de80ca9552d699188e80175bf61e7b781160894d03923aaa7387e8f3ac85d59
|
|
BLAKE2b-256 checksum How to use checksums |
fd786597771e417d09c4335a49a854ca929f28eec0f84c74bcbed826a7b855a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.1
|