🟒GaiaNet

Quick start

Install the default node software stack with a single line of command on Mac, Linux, or Windows WSL.

curl -sSfL 'https://github.com/GaiaNet-AI/gaianet-node/releases/latest/download/install.sh' | bash

Then, follow the prompt on your screen to set up the environment path. The command line will begin with source.

Initialize the node. It will download the model files and vector database files specified in the $HOME/gaianet/config.json file, and it could take a few minutes since the files are large.

gaianet init

Start the node.

gaianet start

The script prints the official node address on the console as follows. You can open a browser to that URL to see the node information and then chat with the AI agent on the node.

... ... https://0xf63939431ee11267f4855a166e11cc44d24960c0.us.gaianet.network

To stop the node, you can run the following script.

gaianet stop

Install guide

curl -sSfL 'https://raw.githubusercontent.com/GaiaNet-AI/gaianet-node/main/install.sh' | bash
The output should look like below:

By default, it installs into the $HOME/gaianet directory. You can also choose to install into an alternative directory.

curl -sSfL 'https://raw.githubusercontent.com/GaiaNet-AI/gaianet-node/main/install.sh' | bash -s -- --base $HOME/gaianet.alt

Initialize the node

gaianet init
The output should look like below:

The init command initializes the node according to the $HOME/gaianet/config.json file. You can use some of our pre-set configurations. For example, the command below initializes a node with the llama-3 8B model with a London guidebook as knowledge base.

gaianet init --config https://raw.githubusercontent.com/GaiaNet-AI/node-configs/main/llama-3-8b-instruct_london/config.json

To see a list of pre-set configurations, you can do gaianet init --help. Besides a pre-set configurations like gaianet_docs, you can also pass a URL to your own config.json for the node to be initialized to the state you'd like.

If you need to init a node installed in an alternative directory, do this.

gaianet init --base $HOME/gaianet.alt

Start the node

gaianet start
The output should look like below:

You can start the node for local use. It will be only accessible via localhost and not available on any of the GaiaNet domain's public URLs.

gaianet start --local-only

You can also start a node installed in an alternative base directory.

gaianet start --base $HOME/gaianet.alt

Stop the node

gaianet stop
The output should look like below:

Stop a node installed in an alternative base directory.

gaianet stop --base $HOME/gaianet.alt

Update configuration

Using gaianet config subcommand can update the key fields defined in the config.json file. You MUST run gaianet init again after you update the configuartion.

To update the chat field, for example, use the following command:

gaianet config --chat-url "https://huggingface.co/second-state/Llama-2-13B-Chat-GGUF/resolve/main/Llama-2-13b-chat-hf-Q5_K_M.gguf"

To update the chat_ctx_size field, for example, use the following command:

gaianet config --chat-ctx-size 5120

Below are all options of the config subcommand.

$ gaianet config --help

Usage: gaianet config [OPTIONS]

Options:
  --chat-url <url>               Update the url of chat model.
  --chat-ctx-size <val>          Update the context size of chat model.
  --embedding-url <url>          Update the url of embedding model.
  --embedding-ctx-size <val>     Update the context size of embedding model.
  --prompt-template <val>        Update the prompt template of chat model.
  --port <val>                   Update the port of LlamaEdge API Server.
  --system-prompt <val>          Update the system prompt.
  --rag-prompt <val>             Update the rag prompt.
  --rag-policy <val>             Update the rag policy [Possible values: system-message, last-user-message].
  --reverse-prompt <val>         Update the reverse prompt.
  --domain <val>                 Update the domain of GaiaNet node.
  --snapshot <url>               Update the Qdrant snapshot.
  --qdrant-limit <val>           Update the max number of result to return.
  --qdrant-score-threshold <val> Update the minimal score threshold for the result.
  --base <path>                  The base directory of GaiaNet node.
  --help                         Show this help message

Last updated