Skip to main content

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

linkcheck Downloads linkcheck License: Apache Twitter

  ___ _         _       ___
 / __| |_  __ _(_)_ _  | __|  _ _ _ _  _ 
| (__| ' \/ _` | | ' \ | _| || | '_| || |
 \___|_||_\__,_|_|_||_||_| \_,_|_|  \_, |
                                     |__/
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 here
  • chainfury specific variables here
  • chainfury_server specific variables here

From Source

Here's a breakdown of folder:

  • chainfury/ contains the chainfury engine
  • server/ contains the chainfury server
  • client/ contains the frontend code for the GUI
  • api_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chainfury-1.7.0a2.tar.gz (56.3 kB view hashes)

Uploaded Source

Built Distribution

chainfury-1.7.0a2-py3-none-any.whl (62.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page