Giter Site home page Giter Site logo

decentralized_ai_bot's Introduction

De-assistant - Decentralized AI Assistant Chatbot

De-assistant is a decentralized AI assistant chatbot built on the Internet Computer Protocol (ICP). This README provides guidance on setting up and running the application.

Setup

Frontend Canister

Credentials

Create a credential.js file in the root directory and set your OpenAI API and the assitant Id key as follows:

export const ASSISTANT_ID = "ASSISTANT_ID";

Refer to credential.example.js Note: This file is ignored by default; please ensure it is excluded from version control to prevent accidental exposure of your assistant id.

After setting up the frontend credentials, ensure that you have the dfx command-line tool installed on your computer. Check its version with the following command:

dfx --version

Install Dependencies

To install project dependencies, run the following command:

npm install

Run the App Locally

Before running the app locally, start the local replica with the following command:

dfx start --clean

To run the app locally, ensure that dfx (Internet Computer CDK) is installed and running.

dfx deploy

This command deploys both the frontend and backend canisters to your local network. However, you can also deploy them separately.

Preview the Deployment

After deployment, you can access the local preview of the app using the links provided in green:

Frontend canister via browser dfinity_js_frontend: http://127.0.0.1:4943/?canisterId=bd3sg-teaaa-aaaaa-qaaba-cai
Backend canister via Candid interface dfinity_js_backend: http://127.0.0.1:4943/?canisterId=br5f7-7uaaa-aaaaa-qaaca-cai&id=bkyz2-fmaaa-aaaaa-qaaaq-cai
internet_identity: http://127.0.0.1:4943/?canisterId=br5f7-7uaaa-aaaaa-qaaca-cai&id=be2us-64aaa-aaaaa-qaabq-cai

Separate Deployment

You can deploy individual parts of the app separately:

  • Deploy only the backend:
dfx deploy dfinity_js_backend
  • Deploy only the frontend:
dfx deploy dfinity_js_frontend
  • Test the frontend locally:
npm start

decentralized_ai_bot's People

Contributors

jonath-z avatar etette avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.