ChainFury is a powerful tool that simplifies the creation and management of chains of prompts, making it easier to build complex chat applications using LLMs.
Project description
🦋 NimbleBox ChainFury
___ _ _ ___
/ __| |_ __ _(_)_ _ | __| _ _ _ _ _
| (__| ' \/ _` | | ' \ | _| || | '_| || |
\___|_||_\__,_|_|_||_||_| \_,_|_| \_, |
|__/
e0 a4 b8 e0 a4 a4 e0 a5 8d e0 a4 af e0 a4
ae e0 a5 87 e0 a4 b5 20 e0 a4 9c e0 a4 af
e0 a4 a4 e0 a5 87
🦋 The open source chaining engine behind Tune Chat and Tune Studio.
Read the Docs
The documentation page contains all the information on using chainfury
and chainfury_server
.
Looking for Inspirations?
Here's a few example to get your journey started on Software 2.0:
- 📚 Retrieval Augmented Generation (RAG): Load a PDF and ask it questions, read docs
- 🏞️ Image generation using Stability: Generate your world, read here
- 🔐 Private Storage: Privately store the data on AWS S3, read privacy
Installation
There are two separate packages built into this repository, first is chainfury
which contains the fury-engine for running
the DAGs and chainfury_server
which contains the self hosted server for the GUI.
pip install chainfury
pip install chainfury_server
# to launch the server
python3 -m chainfury_server
Run Docker
Easiest way to run the server is to use docker. You can use the following command to run ChainFury:
docker build . -f Dockerfile -t chainfury:latest
docker run -p 8000:8000 chainfury:latest
To pass any env variables you can use the command:
docker run --env ENV_KEY=ENV_VALUE -p 8000:8000 chainfury:latest
Checkout all the:
component
environment variables herechainfury
specific variables herechainfury_server
specific variables here
From Source
Here's a breakdown of folder:
chainfury/
contains the chainfury engineserver/
contains the chainfury serverclient/
contains the frontend code for the GUIapi_docs/
contains the documentation
To build the entire system from scratch follow these steps:
git clone https://github.com/NimbleBoxAI/ChainFury
cd ChainFury
python3 -m venv venv
source venv/bin/activate
You will need to have yarn
installed to build the frontend and move it to the correct location on the server
sh stories/build_and_copy.sh
Once the static files are copied we can now proceed to install dependecies:
pip install -e . # editable install the chainfury
pip install -e server/. # editable install the chainfury_server
python3 -m chainfury_server
You can now visit localhost:8000 to see the GUI and sign in with the default username password admin:admin
.
Tests
There are a few test cases for super hard problems like get_kv
which checks the chainfury.base.get_value_by_keys
function.
python3 -m tests -v
Contibutions
ChainFury is an open-source project used in production. We are open to contributions to the project in the form of features, infrastructure or documentation.
- If you're looking for help with your code, hop onto Discord, so that community can help you get to answer faster.
- We would appreciate help towareds writing more tests, see what we have in tests folder
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
Hashes for chainfury-1.7.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9830eee188615bd43eecfc54244f4201e5a9221d71603c2cb865d9905875ee0 |
|
MD5 | d0b2c2562b809a73d3b4f41eba8d1400 |
|
BLAKE2b-256 | 0af7daf2c373ebee7c0a944bc1a98429d47f3f91bd59abb237581d236cad688e |