Skip to content

Commit

Permalink
Improvements to scripts
Browse files Browse the repository at this point in the history
Remove unzip dependency;
Add system_prompt and rag_prompt fields to the config

Signed-off-by: Michael Yuan <[email protected]>
  • Loading branch information
juntao committed Apr 2, 2024
1 parent dbc1342 commit 298c0bb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
Binary file added dashboard.tar.gz
Binary file not shown.
Binary file removed dashboard.zip
Binary file not shown.
8 changes: 8 additions & 0 deletions dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ <h1 class="jumbotron-heading">GaiaNet node dashboard</h1>
val = data["chat"].split('/').pop();
addToTable (key, val);

key = "System prompt";
val = data["system_prompt"];
addToTable (key, val);

key = "Embedding model for knowledge vectors";
val = data["embedding"].split('/').pop();
addToTable (key, val);
Expand All @@ -84,6 +88,10 @@ <h1 class="jumbotron-heading">GaiaNet node dashboard</h1>
val = data["snapshot"].split('/').pop();
addToTable (key, val);

key = "RAG prompt";
val = data["rag_prompt"];
addToTable (key, val);

}).catch(error => console.error('Error fetching JSON:', error));
</script>
</body>
Expand Down
2 changes: 2 additions & 0 deletions demo/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
"prompt_template": "llama-2-chat",
"reverse_prompt": "",
"chat_ctx_size": "4096",
"system_prompt": "You are a helpful, respectful and honest assistant. Always answer accurately, while being safe.",
"embedding": "https://huggingface.co/second-state/All-MiniLM-L6-v2-Embedding-GGUF/resolve/main/all-MiniLM-L6-v2-ggml-model-f16.gguf",
"embedding_ctx_size": "384",
"snapshot": "https://huggingface.co/datasets/gaianet/paris/resolve/main/paris_384_all-minilm-l6-v2_f16.snapshot",
"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",
"domain": "gaianet.xyz",
"llamaedge_port": "8080"
}
12 changes: 6 additions & 6 deletions demo/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ fi
printf "\n"

# 7. Download dashboard to $HOME/gaianet
if ! command -v unzip &> /dev/null
if ! command -v tar &> /dev/null
then
echo "unzip could not be found, please install it."
echo "tar could not be found, please install it."
exit
fi

Expand All @@ -180,10 +180,10 @@ if [ ! -d "$gaianet_base_dir/dashboard" ] || [ "$reinstall" -eq 1 ]; then
rm -rf $gaianet_base_dir/gaianet-node
fi
cd $gaianet_base_dir
curl --progress-bar -LO https://github.com/GaiaNet-AI/gaianet-node/raw/main/dashboard.zip
unzip -q dashboard.zip
curl --progress-bar -LO https://github.com/GaiaNet-AI/gaianet-node/raw/main/dashboard.tar.gz
tar xzf dashboard.tar.gz

rm -rf $gaianet_base_dir/dashboard.zip
rm -rf $gaianet_base_dir/dashboard.tar.gz
else
printf "[+] Using cached dashboard ...\n"
fi
Expand Down Expand Up @@ -580,4 +580,4 @@ printf "The subdomain for frpc is: https://$subdomain.$gaianet_domain\n"

printf "Your node ID is $subdomain Please register it in your portal account to receive awards!\n"

exit 0
exit 0

0 comments on commit 298c0bb

Please sign in to comment.