{"id":13576833,"url":"https://github.com/NimbleBoxAI/ChainFury","last_synced_at":"2025-04-05T08:33:29.408Z","repository":{"id":153308003,"uuid":"624853631","full_name":"NimbleBoxAI/ChainFury","owner":"NimbleBoxAI","description":"🦋 Production grade chaining engine behind TuneChat. Self host today!","archived":false,"fork":false,"pushed_at":"2024-04-04T01:18:20.000Z","size":13280,"stargazers_count":405,"open_issues_count":18,"forks_count":41,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-05-30T04:05:38.390Z","etag":null,"topics":["chat-applications","chatbot-framework","hacktoberfest","hacktoberfest2023","large-language-models","llm","prompt-engineering"],"latest_commit_sha":null,"homepage":"https://nimbleboxai.github.io/ChainFury/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NimbleBoxAI.png","metadata":{"files":{"readme":"README-old.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-07T12:22:57.000Z","updated_at":"2024-08-01T15:29:09.025Z","dependencies_parsed_at":"2023-10-20T09:17:07.798Z","dependency_job_id":"d80cebfb-4191-4148-9a5c-52e6674f2bae","html_url":"https://github.com/NimbleBoxAI/ChainFury","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleBoxAI%2FChainFury","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleBoxAI%2FChainFury/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleBoxAI%2FChainFury/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleBoxAI%2FChainFury/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NimbleBoxAI","download_url":"https://codeload.github.com/NimbleBoxAI/ChainFury/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312065,"owners_count":20918340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat-applications","chatbot-framework","hacktoberfest","hacktoberfest2023","large-language-models","llm","prompt-engineering"],"created_at":"2024-08-01T15:01:14.772Z","updated_at":"2025-04-05T08:33:29.394Z","avatar_url":"https://github.com/NimbleBoxAI.png","language":"Python","readme":"# 🦋 ChainFury\n\n[![linkcheck](https://img.shields.io/badge/Workflow-Passing-darkgreen)](https://github.com/NimbleBoxAI/ChainFury/actions)\n[![Downloads](https://static.pepy.tech/badge/chainfury)](https://pepy.tech/project/chainfury)\n[![linkcheck](https://img.shields.io/badge/Site-🦋ChainFury-lightblue)](https://chainfury.nbox.ai)\n[![License: Apache](https://img.shields.io/badge/License-Apache%20v2.0-red)](https://github.com/NimbleBoxAI/ChainFury/blob/main/LICENSE) \n[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/NimbleBoxAI.svg?style=social\u0026label=Follow%20%40NimbleBoxAI)](https://twitter.com/NimbleBoxAI)\n[![](https://dcbadge.vercel.app/api/server/KhF38hrAJ2?compact=true\u0026style=flat)](https://discord.com/invite/KhF38hrAJ2)\n\n\u003cimg src=\"./docs/1.png\" align=\"center\"/\u003e\n\n🦋 Build complex chat apps using LLMs in 4 clicks ⚡️ [Try it out here](https://chainfury.nbox.ai/)\n\nChainFury is a powerful tool that simplifies the creation and management of chains of prompts, making it easier to build complex chat applications using LLMs. \n\n[ChainFury- Create LLM ChatBots in 4 clicks!](https://medium.com/@chandranih/chainfury-create-llm-chatbots-in-4-clicks-3663538db8c6)\n\n[Why the Fury? Building a new flow engine from scratch](https://blog.nimblebox.ai/new-flow-engine-from-scratch)\n\nWith a simple GUI inspired by [LangFlow](https://github.com/logspace-ai/langflow), ChainFury enables you to chain components of [LangChain](https://github.com/hwchase17/langchain) together, allowing you to embed more complex chat applications with a simple JS snippet.\n\nChainFury supports a range of features, including but not limited to:\n\n- Recording all prompts and responses and storing them in a database\n- Collecting metrics like response latency\n- Querying OpenAI's API to obtain a rating for the response, which it stores in the database\n- Separate scoring mechanism per ChatBot to easily view performance in a dashboard\n- [Plugins](./server/plugins/) to extend the functionality of ChainFury with callbacks\n\n---\n\n\u003cimg src=\"./docs/2.png\" align=\"center\"/\u003e\n\n---\nInstalling ChainFury is easy, with two methods available. We suggest using **the Docker method.**\n\n## Method 1: Docker\n\nThe easiest way to install ChainFury is to use Docker. You can use the following command to run ChainFury:\n\n```bash\ndocker build . -f Dockerfile -t chainfury:latest\n\ndocker run --env OPENAI_API_KEY=\u003cyour_key_here\u003e -p 8000:8000 chainfury:latest\n```\n\nNow you can access the app on [localhost:8000](http://localhost:8000/ui/).\n\n\u003cdetails\u003e\n\u003csummary\u003eOptional environment variable for Database\u003c/summary\u003e\nYou can also pass a Database URL to the docker container using the `CFS_DATABASE` environment variable. If you do not pass a database URL, ChainFury will use a SQLite database.\n\nExample:\n\n```bash\ndocker run -it -E CFS_DATABASE=\"mysql+pymysql://\u003cuser\u003e:\u003cpassword\u003e@127.0.0.1:3306/\u003cdatabase\u003e\" -p 8000:8000 chainfury\n```\n\u003c/details\u003e\n\n\n---\n## Method 2: Manual\n\u003cdetails\u003e\n\u003csummary\u003eFor this, you will need to build the frontend and and then run the backend. The frontend can be built using the following command:\u003c/summary\u003e\n\n```bash\ncd client\nyarn install\nyarn build\ncd ..\n```\n\nTo copy the frontend to the backend, run the following command:\n\n```bash\ncp -r client/dist/ server/static/\nmkdir -p ./server/templates\ncp ./client/dist/index.html ./server/templates/index.html\n```\n\nNow you can install the backend dependencies and run the server. We recommend using Python 3.9 virtual environment for this:\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\ncd server\npython3 -m uvicorn app:app --log-level=debug --host 0.0.0.0 --port 8000 --workers 1\n```\n\u003c/details\u003e\n\u003c!-- collapsable --\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHow to run\u003c/summary\u003e\n\nAssuming you are in `server` directory, you can run the server using the following command:\n\n```bash\npython3 server.py --port 8000 --config_plugins='[\"echo\"]'\n```\n\u003c/details\u003e\n\nNow you can access the app on [localhost:8000](http://localhost:8000/ui/).\n\n---\n\n\u003cimg src=\"./docs/3.png\" align=\"center\"/\u003e\n\n---\n\n1. Start the server by using the docker file provided or by using the manual method.\n\n2. Log into ChainFury by entering username = “admin” and password = “admin”\n\n3. Click on create chatbot\n\n4. Use one of the pre-configured chatbots or use the elements to create a custom chatbot.\n\n5. Save \u0026 create your chatbot and start chatting with it by clicking the chat on the bottom-right. You can see chatbot statistics and feedback metrics in your ChainFury dashboard.\n\n\n---\n\n\u003cimg src=\"./docs/5.png\" align=\"center\"/\u003e\n\n---\n\nThere are six main areas that LangChain is designed to help with.\n\nChainFury consists of the same concepts to build LLM ChatBots. The components are, in increasing order of complexity:\n\n| Glossary | LangChain    | ChainFury    |\n| --- | --- | --- |\n| 📃 LLMs and Prompts | Prompt management, prompt optimization, generic interface for all LLMs, and common utilities for working with LLMs   | Easy prompt management with GUI elements\n| 🔗 Chains | Chains are sequences of calls (whether to an LLM or a different utility). LangChain provides a standard interface for chains, lots of integrations with other tools, and end-to-end chains for common applications | Easy chain management with GUI |\n| 📚 Data Augmented Generation | Data Augmented Generation involves specific types of chains that first interact with an external datasource to fetch data to use in the generation step. Examples of this include summarization of long pieces of text and question/answering over specific data sources | Coming soon |\n| 🤖 Agents | Agents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and repeating that until done. LangChain provides a standard interface for agents, a selection of agents to choose from, and examples of end to end agents| Easy agent management with GUI |\n| 🧠 Memory | Memory is the concept of persisting state between calls of a chain/agent. LangChain provides a standard interface for memory, a collection of memory implementations, and examples of chains/agents that use memory | Memory modules are supported, persistant memory coming soon |\n| 🧐 Evaluation | [BETA] Generative models are notoriously hard to evaluate with traditional metrics. One new way of evaluating them is using language models themselves to do the evaluation. LangChain provides some prompts/chains for assisting in this | Auto evaluation of all prompts though OpenAI APIs |\n\n\n---\n\n\u003cimg src=\"./docs/4.png\" align=\"center\"/\u003e\n\n---\nChainFury is an open-source project, and is currently in the alpha stage. We are open to contributions to the project in the form of features, infrastructure or documentation.\n\n- To contribute to this project, please follow a [\"fork and pull request\"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow. Please do not try to push directly to this repo unless you are maintainer.\n\n- Our [issues](https://github.com/NimbleBoxAI/ChainFury/issues) page is kept up to date with bugs, improvements, and feature requests.\n\n- If you're looking for help with your code, consider posting a question on the [GitHub Discussions board](https://github.com/NimbleBoxAI/ChainFury/discussions), so that more people can benefit from it.\n\n- **Describing your issue:** Try to provide as many details as possible. What exactly goes wrong? How is it failing? Is there an error? \"XY doesn't work\" usually isn't that helpful for tracking down problems. Always remember to include the code you ran and if possible, extract only the relevant parts and don't just dump your entire script. This will make it easier for us to reproduce the error.\n\n- **Sharing long blocks of code or logs:** If you need to include long code, logs or tracebacks, you can wrap them in `\u003cdetails\u003e` and `\u003c/details\u003e`. This [collapses the content](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) so it only becomes visible on click, making the issue easier to read and follow.\n\n","funding_links":[],"categories":["Python","📚 Contents"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNimbleBoxAI%2FChainFury","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNimbleBoxAI%2FChainFury","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNimbleBoxAI%2FChainFury/lists"}