Simple interface for creating and managing LLM chains
Project description
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.
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.2.tar.gz
.
File metadata
- Download URL: llm-blocks-0.3.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5726be2facc2b6282b9349130ea12f7b9ff314d19db1decc497c6a876049fff1 |
|
MD5 | a3ebf31520a293ebd8b01dc5e0f9bdb3 |
|
BLAKE2b-256 | 2dd6b6e6a3c69517684e4d629ae06f77486f08ec080d412b214f90b879173761 |
File details
Details for the file llm_blocks-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: llm_blocks-0.3.2-py3-none-any.whl
- Upload date:
- Size: 4.7 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 | eae82c23aa4935267571cfa99558ba940fc1dbc53351974c15e9b06e60f99c19 |
|
MD5 | de675fe07b0b6fd380b60f2fec9a1348 |
|
BLAKE2b-256 | 5279a965ecd522cff4a23cfc0a9697668b1eb7daa50163ddf64248f750dd6657 |