Skip to content

Commit

Permalink
Merge pull request #217 from NimbleBoxAI/main
Browse files Browse the repository at this point in the history
Push master to internal branch
  • Loading branch information
yashbonde authored Mar 15, 2024
2 parents 1ee352e + 866bfb0 commit fb0c63e
Show file tree
Hide file tree
Showing 43 changed files with 1,804 additions and 1,325 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=""
3 changes: 2 additions & 1 deletion .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 @@ -153,3 +153,4 @@ demo/
logs.py
chunker/
chainfury/chains/
gosrc/
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ ae e0 a5 87 e0 a4 b5 20 e0 a4 9c e0 a4 af

The documentation page contains all the information on using `chainfury` and `chainfury_server`.

#### `chainfury`

<img src="https://d2e931syjhr5o9.cloudfront.net/tune-research/assets/cf_arch.png" align="center"/>

#### `chainfury_server`

<img src="https://d2e931syjhr5o9.cloudfront.net/tune-research/assets/cfs_arch.png" align="center"/>

# Looking for Inspirations?

Here's a few example to get your journey started on Software 2.0:
Expand Down Expand Up @@ -86,7 +94,7 @@ 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

```bash
sh stories/build_and_copy.sh
sh build_ui.sh
```

Once the static files are copied we can now proceed to install dependecies:
Expand All @@ -104,7 +112,7 @@ You can now visit [localhost:8000](http://localhost:8000/ui/) to see the GUI and
There are a few test cases for super hard problems like `get_kv` which checks the `chainfury.base.get_value_by_keys` function.

```bash
python3 -m tests -v
python3 tests/main.py
```

# Contibutions
Expand Down
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.7.0a1"
release = "1.7.0a2"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
3 changes: 0 additions & 3 deletions scripts/build_and_copy.sh → build_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ cd client
yarn install
yarn build

# Go back to the root directory
cd ..

# copy the dist folder to the server
# Go into the server folder, remove the old static folder and copy the new dist folder, copy index.html to templates
echo "Copying the generated files to the server"
Expand Down
19 changes: 14 additions & 5 deletions chainfury/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@
logger,
CFEnv,
)
from chainfury.base import Var, Node, Secret, Chain, Model, Edge
from chainfury.base import (
Var,
Node,
Secret,
Chain,
Model,
Edge,
Tools,
Action,
)
from chainfury.core import (
model_registry,
programatic_actions_registry,
Expand All @@ -24,11 +33,11 @@
Memory,
)
from chainfury.client import get_client
from chainfury.chat import (
from chainfury.types import (
Message,
Chat,
TuneChats,
TuneDataset,
Thread,
ThreadsList,
Dataset,
human,
system,
assistant,
Expand Down
Loading

0 comments on commit fb0c63e

Please sign in to comment.