Skip to main content

Welcome to Nana: The RAGtriever tenx chatbot

Project description


logo

Tenx Chatbot


Contents

Setup

Clone this repository:

git clone git@github.com:10xac/tenx-chatbot.git
cd tenx-chatbot

Create credentials:

  1. Create an environment file and a .credentials folder in the root directory:
mkdir .credentials
touch .env
  1. Put your OAuth 2.0 credentials for the data extraction api's in the ".credentials/" folder (JSON)
.credentails/
        oauth_{extraction_api}.json
  • Create a credential by looking at the description here
  1. Setup environment variables on ~/.bashrc or .env:
# Weaviate instance credentials
export WEAVIATE_URL=""
export WEAVIATE_API_KEY=""
export OPENAI_API_KEY=""
export WEAVIATE_MODEL="gpt-3.5-turbo"

# Data extraction API's
export oauth_youtube=""
export oauth_slack=""
export oauth_email=""
export oauth_notion=""
export oauth_gdrive=""

# Tenx aws s3 access keys
export Access_Key_ID=""
export Secret_Access_Key=""

Install

Build from source

Run this to build and run the application:

(After the build runs use the backend domain 'http://0.0.0.0:8000/docs' to test since the frontend is decoupled.)

chmod +x build.sh
./build.sh

Deploy With Docker

Run this to build a docker and run the application:

(After the docker runs use the backend domain 'http://0.0.0.0:8000/docs' to test since the frontend is decoupled.)

git clone git@github.com:10xac/tenx-chatbot.git
cd tenx-chatbot
docker-compose up

(back to top)


s3pipeline (ingest data to chatbot)

Overview

This is your new Kedro project, which was generated using Kedro 0.18.7.

Take a look at the Kedro documentation to get started.

Rules and guidelines

In order to get the best out of the template:

  • Don't remove any lines from the .gitignore file we provide
  • Make sure your results can be reproduced by following a data engineering convention
  • Don't commit data to your repository
  • Don't commit any credentials or your local configuration to your repository. Keep all your credentials and local configuration in conf/local/

How to install dependencies

Declare any dependencies in src/requirements.txt for pip installation and src/environment.yml for conda installation.

To install them, run:

cd prompt/extraction
pip install -r src/requirements.txt

How to run your Kedro pipeline

You can run your Kedro project with:

kedro run

How to test your Kedro project

Have a look at the file src/tests/test_run.py for instructions on how to write your tests. You can run your tests as follows:

kedro test

To configure the coverage threshold, go to the .coveragerc file.

Project dependencies

To generate or update the dependency requirements for your project:

kedro build-reqs

This will pip-compile the contents of src/requirements.txt into a new file src/requirements.lock. You can see the output of the resolution by opening src/requirements.lock.

After this, if you'd like to update your project requirements, please update src/requirements.txt and re-run kedro build-reqs.

Further information about project dependencies

How to work with Kedro and notebooks

Note: Using kedro jupyter or kedro ipython to run your notebook provides these variables in scope: context, catalog, and startup_error.

Jupyter, JupyterLab, and IPython are already included in the project requirements by default, so once you have run pip install -r src/requirements.txt you will not need to take any extra steps before you use them.

Jupyter

To use Jupyter notebooks in your Kedro project, you need to install Jupyter:

pip install jupyter

After installing Jupyter, you can start a local notebook server:

kedro jupyter notebook

JupyterLab

To use JupyterLab, you need to install it:

pip install jupyterlab

You can also start JupyterLab:

kedro jupyter lab

IPython

And if you want to run an IPython session:

kedro ipython

How to convert notebook cells to nodes in a Kedro project

You can move notebook code over into a Kedro project structure using a mixture of cell tagging and Kedro CLI commands.

By adding the node tag to a cell and running the command below, the cell's source code will be copied over to a Python file within src/<package_name>/nodes/:

kedro jupyter convert <filepath_to_my_notebook>

Note: The name of the Python file matches the name of the original notebook.

Alternatively, you may want to transform all your notebooks in one go. Run the following command to convert all notebook files found in the project root directory and under any of its sub-folders:

kedro jupyter convert --all

How to ignore notebook output cells in git

To automatically strip out all output cell contents before committing to git, you can run kedro activate-nbstripout. This will add a hook in .git/config which will run nbstripout before anything is committed to git.

Note: Your output cells will be retained locally.

Package your Kedro project

Further information about building project documentation and packaging your project

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

tenxbot-0.0.1.tar.gz (11.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tenxbot-0.0.1-py3-none-any.whl (11.9 MB view details)

Uploaded Python 3

File details

Details for the file tenxbot-0.0.1.tar.gz.

File metadata

  • Download URL: tenxbot-0.0.1.tar.gz
  • Upload date:
  • Size: 11.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for tenxbot-0.0.1.tar.gz
Algorithm Hash digest
SHA256 23e4259954f7443d70de4bedd32f850197a325a2416e3d2f8f5a1455d7e5a0b1
MD5 512d1a27ddf5d2a5a4ee8d54d081a0a6
BLAKE2b-256 b3a9819093f66d615ead501aa77c49e441a3a7f22147c606d0d66a6cd9171b31

See more details on using hashes here.

File details

Details for the file tenxbot-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tenxbot-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for tenxbot-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c66e38bc21cbb593b0a032ccf31ee65a4b6119f343863b5b09aa19dbed653042
MD5 88aad47b628b48c017d57139aa7c6964
BLAKE2b-256 2305d72c5b7b9a964d365cf452763eaa1b715d7ab7e209b8794b6d072391b42f

See more details on using hashes here.

Supported by

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