Skip to content

Commit

Permalink
Merge pull request #209 from NimbleBoxAI/fury
Browse files Browse the repository at this point in the history
cf 1.7.0a2 release | moving towards wu-shi-dragon-grotto
  • Loading branch information
yashbonde authored Mar 12, 2024
2 parents 5367108 + 094a454 commit 88cd04e
Show file tree
Hide file tree
Showing 60 changed files with 2,494 additions and 4,009 deletions.
29 changes: 29 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# chainfury server
# ================
# These are the environment variables that are used by the chainfury_server
# For chainfury jump below to the chainfury section

# Required
# --------

# URL to the database for chainfury server, uses sqlalchemy, so most things should work
CFS_DATABASE="db_drivers://username:password@host:port/db_name"

# (once in a lifetime) secret string for creating the JWT secrets
JWT_SECRET="secret"

# (once in a lifetime) password to store the user secrets
CFS_SECRETS_PASSWORD="password"

# chainfury
# =========
# These are the environment variables that are used by the chainfury

# To store all the file and data in the chainfury server
CF_FOLDER="~/cf"

# (client mode) the URL for the chainfury server
CF_URL=""

# (client mode) the token for the chainfury server
CF_TOKEN=""
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ langflow
dunmp.rdb
*.ipynb
server/chainfury_server/stories/fury.json
notebooks/*
notebooks
stories/fury.json
workers/
private.sh
Expand All @@ -151,4 +151,6 @@ api_docs/_static/
cf
demo/
logs.py
chunker/
chunker/
chainfury/chains/
gosrc/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "cf_internal"]
path = cf_internal
url = https://github.com/NimbleBoxAI/cf_internal.git
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ COPY --from=builder /app/dist/. /app/chainfury_server/static/.

WORKDIR /app/chainfury_server
EXPOSE 8000
CMD ["python3", "server.py", "--host", "0.0.0.0", "--port", "8000"]
CMD ["python3", "-m", "chainfury_server", "--host", "0.0.0.0", "--port", "8000"]
45 changes: 0 additions & 45 deletions Dockerfile.private

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 NimbleBox.ai (Frello Techonology Private Limited)
Copyright 2024 NimbleBox.ai (Frello Techonology Private Limited)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
45 changes: 22 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/NimbleBoxAI.svg?style=social&label=Follow%20%40NimbleBoxAI)](https://twitter.com/NimbleBoxAI)
[![](https://dcbadge.vercel.app/api/server/KhF38hrAJ2?compact=true&style=flat)](https://discord.com/invite/KhF38hrAJ2)

🦋 Build complex chat apps using LLMs in 4 clicks ⚡️ [Try it out here](https://chainfury.nbox.ai/). Used in production by [chat.nbox.ai](https://chat.nbox.ai).
```
___ _ _ ___
/ __| |_ __ _(_)_ _ | __| _ _ _ _ _
| (__| ' \/ _` | | ' \ | _| || | '_| || |
\___|_||_\__,_|_|_||_||_| \_,_|_| \_, |
|__/
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](https://chat.tune.app) and [Tune Studio](https://studio.tune.app).

# Read the [Docs](https://nimbleboxai.github.io/ChainFury/index.html)

Expand Down Expand Up @@ -81,37 +92,25 @@ sh stories/build_and_copy.sh
Once the static files are copied we can now proceed to install dependecies:

```bash
pip install setuptools
pip install -e . # editable install the chainfury
cd server
pip install -e . # editable install the chainfury_server
pip install -e server/. # editable install the chainfury_server
python3 -m chainfury_server
```

To start you can now do:
You can now visit [localhost:8000](http://localhost:8000/ui/) 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.

```bash
cd chainfury_server
python3 server.py
python3 -m tests -v
```

You can now visit [localhost:8000](http://localhost:8000/ui/) to see the GUI.

# 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.

- Our [issues](https://github.com/NimbleBoxAI/ChainFury/issues) page is kept up to date with bugs, improvements, and feature requests.

- If you're looking for help with your code, hop onto [GitHub Discussions board](https://github.com/NimbleBoxAI/ChainFury/discussions) or
[Discord](https://discord.com/invite/KhF38hrAJ2), so that more people can benefit from it.

- **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.

- **Sharing long blocks of code or logs:** If you need to include long code, logs or tracebacks, you can wrap them in
`<details>` and `</details>`. 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.

- If you're looking for help with your code, hop onto [Discord](https://discord.com/invite/KhF38hrAJ2), 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](./tests/)
2 changes: 1 addition & 1 deletion api_docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
project = "ChainFury"
copyright = "2023, NimbleBox Engineering"
author = "NimbleBox Engineering"
release = "1.6.4"
release = "1.7.0a2"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
1 change: 0 additions & 1 deletion cf_internal
Submodule cf_internal deleted from 7f44e7
25 changes: 23 additions & 2 deletions chainfury/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright © 2023- Frello Technology Private Limited

import os
import dotenv

Expand All @@ -12,8 +14,17 @@
logger,
CFEnv,
)
from chainfury.base import Var, Node, Secret, Chain, Model, Edge
from chainfury.agent import (
from chainfury.base import (
Var,
Node,
Secret,
Chain,
Model,
Edge,
Tools,
Action,
)
from chainfury.core import (
model_registry,
programatic_actions_registry,
ai_actions_registry,
Expand All @@ -22,4 +33,14 @@
Memory,
)
from chainfury.client import get_client
from chainfury.types import (
Message,
Thread,
ThreadsList,
Dataset,
human,
system,
assistant,
)

from chainfury import components
2 changes: 2 additions & 0 deletions chainfury/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright © 2023- Frello Technology Private Limited

from chainfury.cli import main

main()
Loading

0 comments on commit 88cd04e

Please sign in to comment.