LLM Blocks :building_construction:
LLM Blocks is a Python package that provides a simple interface for creating and managing Language Model (LLM) chains. It leverages the power of OpenAI's GPT-3.5-turbo to generate AI completions based on user-defined templates.
:book: Table of Contents
:question: Why Use LLM Blocks
LLM Blocks is designed to simplify the process of creating and managing LLM chains. It allows you to define a template and generate AI completions based on that template. This can be particularly useful for tasks such as generating text, answering questions, or creating conversational agents. With LLM Blocks, you can focus on defining your templates and let the package handle the rest.
:file_folder: Repo Structure
The repository has the following structure:
.
├── .gitignore
├── secrets_manager.py
├── __pycache__
├── venv
├── repo_loader_data
├── .env
├── .vscode
├── dist
├── llm_blocks.egg-info
├── build
├── llm_blocks
│ ├── blocks.py
│ └── __init__.py
├── requirements.txt
├── setup.py
├── test.ipynb
└── turbo_docs.toml
:wrench: Installation
You can install LLM Blocks from PyPI:
pip install llm-blocks
:computer: Usage
Here's a basic example of how to use LLM Blocks:
from llm_blocks import blocks
# Define a template
template = "You're a sophisticated software development AI expert system, capable of assistance with the development of advanced software applications. Your job is to produce comprehensive software architecture designs for MVP software solutions.\\n", "{application_description}"
# Create a block
block = blocks.Block(template=template, stream=True)
# Generate a completion
block(application_description="AI assisted meal planning & grocery list given nutritional goals and dietary restrictions.")
In this example, we define a template and use it to create a block. We then generate a completion by calling the block with the application_description argument.
:handshake: Contributing
Contributions are welcome! Please feel free to submit a pull request.
:email: Contact
If you have any questions or feedback, please reach out to us at voynow99@gmail.com.
Metadata
Release files for llm-blocks 0.3.2
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.2.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_blocks-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / llm-blocks-0.3.2.tar.gz
| Download URL | llm-blocks-0.3.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5726be2facc2b6282b9349130ea12f7b9ff314d19db1decc497c6a876049fff1
|
|
BLAKE2b-256 checksum How to use checksums |
2dd6b6e6a3c69517684e4d629ae06f77486f08ec080d412b214f90b879173761
|
| 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.2-py3-none-any.whl
| Download URL | llm_blocks-0.3.2-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eae82c23aa4935267571cfa99558ba940fc1dbc53351974c15e9b06e60f99c19
|
|
BLAKE2b-256 checksum How to use checksums |
5279a965ecd522cff4a23cfc0a9697668b1eb7daa50163ddf64248f750dd6657
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.1
|