:; @set() { export "$@"; }; @echo() { echo "$@"; } @echo Prosty Język v1.2 - Jerzy Głowacki na licencji Apache 2.0 :; # Zmienne: @set llamafile=prosty-jezyk.llamafile @set logfile=prosty-jezyk.log :; # *NIX: :; [ ! -f $llamafile ] && echo Pobieranie $llamafile... && curl -Lo $llamafile https://huggingface.co/jglowa/prosty-jezyk/resolve/main/prosty-jezyk.llamafile?download=true && chmod +x $llamafile && echo Gotowe! :; >$logfile :; echo "Uruchamianie serwera llamafile na http://localhost:8080..." :; ./$llamafile --server --v2 --flash-attn 1 $@ 2>&1 | tee $logfile & :; echo "Oczekiwanie na załadowanie serwera llamafile..." :; (tail -f $logfile &) | grep -q "server listen" && echo "Uruchamianie czatu na stronie http://localhost:8080 w przeglądarce..." && xdg-open "http://localhost:8080" || open "http://localhost:8080"; wait; exit $? :; # Windows: @echo off chcp 65001 >nul if not exist %llamafile% echo Pobieranie %llamafile%... && curl -Lo %llamafile% https://huggingface.co/jglowa/prosty-jezyk/resolve/main/prosty-jezyk.llamafile?download=true && echo Gotowe! break>%logfile% start "Prosty Język" cmd /c "echo Uruchamianie serwera llamafile na http://localhost:8080... && %llamafile% --server --v2 --flash-attn 1 %* 2>&1 | find /v "" >%logfile%" echo Oczekiwanie na załadowanie serwera llamafile... :waitForReady findstr /c:"server listen" %logfile% >nul && echo Uruchamianie czatu na http://localhost:8080 w przeglądarce... && start http://localhost:8080 || (timeout 1 >nul & goto waitForReady)