{"id":13487062,"url":"https://github.com/GaiaNet-AI/gaianet-node","last_synced_at":"2025-03-27T21:31:50.731Z","repository":{"id":226204764,"uuid":"768036550","full_name":"GaiaNet-AI/gaianet-node","owner":"GaiaNet-AI","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-13T04:50:50.000Z","size":30263,"stargazers_count":12,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-14T02:17:09.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GaiaNet-AI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-06T10:57:45.000Z","updated_at":"2024-08-08T11:40:21.559Z","dependencies_parsed_at":"2024-03-07T15:01:59.020Z","dependency_job_id":"d1b3b1e6-a76e-42fc-a54e-2fcf7522fcd2","html_url":"https://github.com/GaiaNet-AI/gaianet-node","commit_stats":null,"previous_names":["gaia-network/gaia-node","gaianet-ai/gaia-node","gaianet-ai/gaianet-node"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaiaNet-AI%2Fgaianet-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaiaNet-AI%2Fgaianet-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaiaNet-AI%2Fgaianet-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaiaNet-AI%2Fgaianet-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GaiaNet-AI","download_url":"https://codeload.github.com/GaiaNet-AI/gaianet-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245927303,"owners_count":20695209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T18:00:54.934Z","updated_at":"2025-03-27T21:31:50.699Z","avatar_url":"https://github.com/GaiaNet-AI.png","language":"Shell","funding_links":[],"categories":["Shell","A01_文本生成_文本对话","📚 Projects (1974 total)","Apps","Repos","Agent Integration \u0026 Deployment Tools","MCP Servers","Chatbots \u0026 Virtual Companions"],"sub_categories":["大语言对话模型及数据","MCP Servers","AI","AI Developer Toolkit","Agent Platforms"],"readme":"# Run your own GaiaNet node\n\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://discord.gg/gaianet-ai\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/chat-Discord-7289DA?logo=discord\" alt=\"GaiaNet Discord\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/Gaianet_AI\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Twitter-1DA1F2?logo=twitter\u0026amp;logoColor=white\" alt=\"GaiaNet Twitter\"\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://www.gaianet.ai/\"\u003e\n    \u003cimg src=\"https://img.shields.io/website?up_message=Website\u0026url=https://www.gaianet.ai/\" alt=\"Gaianet website\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n[Japanese(日本語)](README-ja.md) | [Chinese(中文)](README-cn.md) | [Korean(한국어)](README-kr.md) | [Turkish (Türkçe)](README-tr.md) | [Farsi(فارسی)](README-fa.md) | [Arabic (العربية)](README-ar.md) | [Indonesia](README-id.md) | [Russian (русскийة)](README-ru.md) | [Portuguese (português)](README-pt.md) | We need your help to translate this README into your native language.\n\nLike our work? ⭐ Star us!\n\nCheckout our [official docs](https://docs.gaianet.ai/) and a [Manning ebook](https://www.manning.com/liveprojectseries/open-source-llms-on-your-own-computer) on how to customize open source models.\n\n---\n\n## Quick start\n\nInstall the default node software stack with a single line of command on Mac, Linux, or Windows WSL.\n\n```bash\ncurl -sSfL 'https://github.com/GaiaNet-AI/gaianet-node/releases/latest/download/install.sh' | bash\n```\n\n\u003e Then, follow the prompt on your screen to set up the environment path. The command line will begin with `source`.\n\n![image](https://github.com/user-attachments/assets/dc75817c-9a54-4994-ab90-1efb1a018b17)\n\n\nInitialize 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.\n\n```bash\ngaianet init\n```\n\nStart the node.\n\n```bash\ngaianet start\n```\n\nThe script prints the official node address on the console as follows.\nYou can open a browser to that URL to see the node information and then chat with the AI agent on the node.\n\n```\n... ... https://0xf63939431ee11267f4855a166e11cc44d24960c0.us.gaianet.network\n```\n\nTo stop the node, you can run the following script.\n\n```bash\ngaianet stop\n```\n\n## Install guide\n\n```bash\ncurl -sSfL 'https://raw.githubusercontent.com/GaiaNet-AI/gaianet-node/main/install.sh' | bash\n```\n\n\u003cdetails\u003e\u003csummary\u003e The output should look like below: \u003c/summary\u003e\n\n```console\n[+] Downloading default config file ...\n\n[+] Downloading nodeid.json ...\n\n[+] Installing WasmEdge with wasi-nn_ggml plugin ...\n\nInfo: Detected Linux-x86_64\n\nInfo: WasmEdge Installation at /home/azureuser/.wasmedge\n\nInfo: Fetching WasmEdge-0.13.5\n\n/tmp/wasmedge.2884467 ~/gaianet\n######################################################################## 100.0%\n~/gaianet\nInfo: Fetching WasmEdge-GGML-Plugin\n\nInfo: Detected CUDA version:\n\n/tmp/wasmedge.2884467 ~/gaianet\n######################################################################## 100.0%\n~/gaianet\nInstallation of wasmedge-0.13.5 successful\nWasmEdge binaries accessible\n\n    The WasmEdge Runtime wasmedge version 0.13.5 is installed in /home/azureuser/.wasmedge/bin/wasmedge.\n\n\n[+] Installing Qdrant binary...\n    * Download Qdrant binary\n################################################################################################## 100.0%\n\n    * Initialize Qdrant directory\n\n[+] Downloading the rag-api-server.wasm ...\n################################################################################################## 100.0%\n\n[+] Downloading dashboard ...\n################################################################################################## 100.0%\n```\n\n\u003c/details\u003e\n\nBy default, it installs into the `$HOME/gaianet` directory. You can also choose to install into an alternative directory.\n\n```bash\ncurl -sSfL 'https://raw.githubusercontent.com/GaiaNet-AI/gaianet-node/main/install.sh' | bash -s -- --base $HOME/gaianet.alt\n```\n\n## Initialize the node\n\n```\ngaianet init\n```\n\n\u003cdetails\u003e\u003csummary\u003e The output should look like below: \u003c/summary\u003e\n\n```bash\n[+] Downloading Llama-2-7b-chat-hf-Q5_K_M.gguf ...\n############################################################################################################################## 100.0%############################################################################################################################## 100.0%\n\n[+] Downloading all-MiniLM-L6-v2-ggml-model-f16.gguf ...\n\n############################################################################################################################## 100.0%############################################################################################################################## 100.0%\n\n[+] Creating 'default' collection in the Qdrant instance ...\n\n    * Start a Qdrant instance ...\n\n    * Remove the existed 'default' Qdrant collection ...\n\n    * Download Qdrant collection snapshot ...\n############################################################################################################################## 100.0%############################################################################################################################## 100.0%\n\n    * Import the Qdrant collection snapshot ...\n\n    * Recovery is done successfully\n```\n\n\u003c/details\u003e\n\nThe `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.\n\n```bash\ngaianet init --config https://raw.githubusercontent.com/GaiaNet-AI/node-configs/main/llama-3-8b-instruct_london/config.json\n```\n\nTo see a list of pre-set configurations, you can do `gaianet init --help`.\nBesides 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.\n\nIf you need to `init` a node installed in an alternative directory, do this.\n\n```bash\ngaianet init --base $HOME/gaianet.alt\n```\n\n## Start the node\n\n```\ngaianet start\n```\n\n\u003cdetails\u003e\u003csummary\u003e The output should look like below: \u003c/summary\u003e\n\n```bash\n[+] Starting Qdrant instance ...\n\n    Qdrant instance started with pid: 39762\n\n[+] Starting LlamaEdge API Server ...\n\n    Run the following command to start the LlamaEdge API Server:\n\nwasmedge --dir .:./dashboard --nn-preload default:GGML:AUTO:Llama-2-7b-chat-hf-Q5_K_M.gguf --nn-preload embedding:GGML:AUTO:all-MiniLM-L6-v2-ggml-model-f16.gguf rag-api-server.wasm --model-name Llama-2-7b-chat-hf-Q5_K_M,all-MiniLM-L6-v2-ggml-model-f16 --ctx-size 4096,384 --prompt-template llama-2-chat --qdrant-collection-name default --web-ui ./ --socket-addr 0.0.0.0:8080 --log-prompts --log-stat --rag-prompt \"Use the following pieces of context to answer the user's question.\\nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\\n----------------\\n\"\n\n\n    LlamaEdge API Server started with pid: 39796\n```\n\n\u003c/details\u003e\n\nYou 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.\n\n```bash\ngaianet start --local-only\n```\n\nYou can also start a node installed in an alternative base directory.\n\n```bash\ngaianet start --base $HOME/gaianet.alt\n```\n\n### Stop the node\n\n```bash\ngaianet stop\n```\n\n\u003cdetails\u003e\u003csummary\u003e The output should look like below: \u003c/summary\u003e\n\n```bash\n[+] Stopping WasmEdge, Qdrant and frpc ...\n```\n\n\u003c/details\u003e\n\nStop a node installed in an alternative base directory.\n\n```bash\ngaianet stop --base $HOME/gaianet.alt\n```\n\n### Update configuration\n\nUsing `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.\n\nTo update the `chat` field, for example, use the following command:\n\n```bash\ngaianet config --chat-url \"https://huggingface.co/second-state/Llama-2-13B-Chat-GGUF/resolve/main/Llama-2-13b-chat-hf-Q5_K_M.gguf\"\n```\n\nTo update the `chat_ctx_size` field, for example, use the following command:\n\n```bash\ngaianet config --chat-ctx-size 5120\n```\n\nBelow are all options of the `config` subcommand.\n\n```console\n$ gaianet config --help\n\nUsage: gaianet config [OPTIONS]\n\nOptions:\n  --chat-url \u003curl\u003e               Update the url of chat model.\n  --chat-ctx-size \u003cval\u003e          Update the context size of chat model.\n  --embedding-url \u003curl\u003e          Update the url of embedding model.\n  --embedding-ctx-size \u003cval\u003e     Update the context size of embedding model.\n  --prompt-template \u003cval\u003e        Update the prompt template of chat model.\n  --port \u003cval\u003e                   Update the port of LlamaEdge API Server.\n  --system-prompt \u003cval\u003e          Update the system prompt.\n  --rag-prompt \u003cval\u003e             Update the rag prompt.\n  --rag-policy \u003cval\u003e             Update the rag policy [Possible values: system-message, last-user-message].\n  --reverse-prompt \u003cval\u003e         Update the reverse prompt.\n  --domain \u003cval\u003e                 Update the domain of GaiaNet node.\n  --snapshot \u003curl\u003e               Update the Qdrant snapshot.\n  --qdrant-limit \u003cval\u003e           Update the max number of result to return.\n  --qdrant-score-threshold \u003cval\u003e Update the minimal score threshold for the result.\n  --base \u003cpath\u003e                  The base directory of GaiaNet node.\n  --help                         Show this help message\n```\n\nHave fun!\n\n### Contributors\n\n\u003ca href=\"https://github.com/GaiaNet-AI/gaianet-node/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=GaiaNet-AI/gaianet-node\" alt=\"Gaia project contributors\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGaiaNet-AI%2Fgaianet-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGaiaNet-AI%2Fgaianet-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGaiaNet-AI%2Fgaianet-node/lists"}