QiaoXingLi / web3-copilot

Web3Copilot is an artificial intelligence tool developed using Council by ChainML to assist new and existing web3 users navigate the ecosystem.

Home Page:https://www.chainml.net/council

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

web3-copilot

Web3Copilot is an artificial intelligence tool developed using Council by ChainML to assist Web3 users navigate the ecosystem.

Requirements

  • Python >=3.9
  • pip >=23.1

Setup

  • Create a new file called .env
  • Create a virtual Python environment
    • python -m venv ./venv
  • Activate the Python virtual env
    • Windows:
      • In cmd.exe: venv\Scripts\activate.bat
      • In PowerShell: venv\Scripts\Activate.ps1
    • Linux/MacOS: source venv/bin/activate
  • Install the project dependencies:
    • pip install -r requirements.txt
  • Generate PDF files:
    • python web3_copilot/doc_retrieval/generate.py

Usage

Run Agent Demo

  • python demo.py

Run Flask App

  • python app.py

NOTE: this will run on port - http://127.0.0.1:8000

Cleanup

  • Delete database
    • rm -rf web3_copilot/doc_retrieval/data/database/chromadb
  • Deactivate virtual env
    • deactivate
  • (optional) Delete virtual env
    • rm -rf ./venv

Adding more docs from other web3 projects

NOTE: For the purpose of this tutorial, the script generates PDFs for projects that use Markdown files (.md) which are stored in the docs/ folder in their documentation repository.

Requirements

  • Node >=12.22
  • npm >= 6.14
  • Git >=1.7

Steps

  • Update the PROJECT_REPOS dictionary in web3_copilot/common/constants.py as desired.
  • Install md-to-pdf
    • npm i -g md-to-pdf
  • Run python web3_copilot/doc_retrieval/generate.py

Tutorial Jupyter Notebooks

First Example

The notebooks/ directory contains first_example.ipynb, an introductory notebook to Council.

To run this notebook:

  • Go to the following Google Colab link.
  • If you would like to edit the notebook, you must first make a copy: Press File -> Save a Copy in Drive.

Try out Council

The notebooks/ directory also contains council_getting_started.ipynb, a Council tutorial for creating an Agent with your own Skills and Chains.

To edit and run this notebook:

  • Go to the following Google Colab link.
  • Press File -> Save a Copy in Drive.

ETHToronto Presentation

Building AI Agents with ‘Council’.

About

Web3Copilot is an artificial intelligence tool developed using Council by ChainML to assist new and existing web3 users navigate the ecosystem.

https://www.chainml.net/council

License:Apache License 2.0


Languages

Language:Python 64.8%Language:Jupyter Notebook 33.6%Language:Jinja 1.6%