Package: tenxbot
Tenx ChatbotContentsContentsSetupInstalls3pipelineOverviewRules and guidelinesHow to install dependenciesHow to run your Kedro pipelineHow to test your Kedro projectProject dependenciesHow to work with Kedro and notebooksJupyterJupyterLabIPythonHow to convert notebook cells to nodes in a Kedro projectHow to ignore notebook output cells ingitPackage your Kedro projectSetupClone this repository:gitclonegit@github.com:10xac/tenx-chatbot.gitcdtenx-chatbotCreate credentials:Create an environment file and a .credentials folder in the root directory:mkdir.credentials
touch.envPut your OAuth 2.0 credentials for the data extraction api's in the ".credentials/" folder (JSON).credentails/
        oauth_{extraction_api}.jsonCreate a credential by looking at the descriptionhereSetup environment variables on~/.bashrcor.env:# Weaviate instance credentialsexportWEAVIATE_URL=""exportWEAVIATE_API_KEY=""exportOPENAI_API_KEY=""exportWEAVIATE_MODEL="gpt-3.5-turbo"# Data extraction API'sexportoauth_youtube=""exportoauth_slack=""exportoauth_email=""exportoauth_notion=""exportoauth_gdrive=""# Tenx aws s3 access keysexportAccess_Key_ID=""exportSecret_Access_Key=""InstallBuild from sourceRunthis 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+xbuild.sh
./build.shDeploy With DockerRunthis 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.)gitclonegit@github.com:10xac/tenx-chatbot.gitcdtenx-chatbot
docker-composeup(back to top)s3pipeline (ingest data to chatbot)OverviewThis is your new Kedro project, which was generated usingKedro 0.18.7.Take a look at theKedro documentationto get started.Rules and guidelinesIn order to get the best out of the template:Don't remove any lines from the.gitignorefile we provideMake sure your results can be reproduced by following a data engineering conventionDon't commit data to your repositoryDon't commit any credentials or your local configuration to your repository. Keep all your credentials and local configuration inconf/local/How to install dependenciesDeclare any dependencies insrc/requirements.txtforpipinstallation andsrc/environment.ymlforcondainstallation.To install them, run:cd prompt/extraction
pip install -r src/requirements.txtHow to run your Kedro pipelineYou can run your Kedro project with:kedro runHow to test your Kedro projectHave a look at the filesrc/tests/test_run.pyfor instructions on how to write your tests. You can run your tests as follows:kedro testTo configure the coverage threshold, go to the.coveragercfile.Project dependenciesTo generate or update the dependency requirements for your project:kedro build-reqsThis willpip-compilethe contents ofsrc/requirements.txtinto a new filesrc/requirements.lock. You can see the output of the resolution by openingsrc/requirements.lock.After this, if you'd like to update your project requirements, please updatesrc/requirements.txtand re-runkedro build-reqs.Further information about project dependenciesHow to work with Kedro and notebooksNote: Usingkedro jupyterorkedro ipythonto run your notebook provides these variables in scope:context,catalog, andstartup_error.Jupyter, JupyterLab, and IPython are already included in the project requirements by default, so once you have runpip install -r src/requirements.txtyou will not need to take any extra steps before you use them.JupyterTo use Jupyter notebooks in your Kedro project, you need to install Jupyter:pip install jupyterAfter installing Jupyter, you can start a local notebook server:kedro jupyter notebookJupyterLabTo use JupyterLab, you need to install it:pip install jupyterlabYou can also start JupyterLab:kedro jupyter labIPythonAnd if you want to run an IPython session:kedro ipythonHow to convert notebook cells to nodes in a Kedro projectYou can move notebook code over into a Kedro project structure using a mixture ofcell taggingand Kedro CLI commands.By adding thenodetag to a cell and running the command below, the cell's source code will be copied over to a Python file withinsrc/<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 --allHow to ignore notebook output cells ingitTo automatically strip out all output cell contents before committing togit, you can runkedro activate-nbstripout. This will add a hook in.git/configwhich will runnbstripoutbefore anything is committed togit.Note:Your output cells will be retained locally.Package your Kedro projectFurther information about building project documentation and packaging your project