diff --git a/gaianet b/gaianet index d40ae39..b612ffc 100755 --- a/gaianet +++ b/gaianet @@ -1173,11 +1173,11 @@ start() { printf "[+] Starting Server Assistant ...\n\n" sleep 2 - # parse server_health_url - server_health_url=$(awk -F'"' '/"server_health_url":/ {print $4}' $gaianet_base_dir/config.json) - # check if server_health_url is empty - if [ -z "$server_health_url" ]; then - error " * server_health_url is empty. Exiting ..." + # parse domain + domain=$(awk -F'"' '/"domain":/ {print $4}' $gaianet_base_dir/config.json) + # check if domain is empty + if [ -z "$domain" ]; then + error " * domain is empty. Exiting ..." # stop the running services stop_force @@ -1185,11 +1185,10 @@ start() { exit 1 fi - # parse server_info_url - server_info_url=$(awk -F'"' '/"server_info_url":/ {print $4}' $gaianet_base_dir/config.json) - # check if server_info_url is empty - if [ -z "$server_info_url" ]; then - error " * server_info_url is empty. Exiting ..." + # parse device_id + device_id=$(grep 'metadatas.deviceId' "$frpc_toml" | awk -F' = ' '{print $2}' | tr -d '"') + if [ -z "$device_id" ]; then + error " * Devide id is not assigned. Please run 'gaianet init' command first." # stop the running services stop_force @@ -1204,7 +1203,7 @@ start() { # start assistant export RUST_LOG=info - nohup gaias --server-socket-addr 0.0.0.0:$llamaedge_port --server-log-file $gaianet_base_dir/log/start-llamaedge.log --server-health-url $server_health_url --server-info-url $server_info_url --system-prompt "$system_prompt" --rag-prompt "$rag_prompt" --log $gaianet_base_dir/log/assistant.log > /dev/null 2>&1 & + nohup gaias --server-socket-addr 0.0.0.0:$llamaedge_port --server-log-file $gaianet_base_dir/log/start-llamaedge.log --domain $domain --device-id $device_id --system-prompt "$system_prompt" --rag-prompt "$rag_prompt" --log $gaianet_base_dir/log/assistant.log > /dev/null 2>&1 & sleep 2