From b33e2da75efab4246f9f1d74a0be56aba1d8bd07 Mon Sep 17 00:00:00 2001 From: sigoden Date: Sun, 28 Apr 2024 20:37:46 +0800 Subject: refactor: improve serve responses (#455) --- Argcfile.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Argcfile.sh') diff --git a/Argcfile.sh b/Argcfile.sh index a438bbb..1e5229a 100755 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -28,18 +28,23 @@ test-without-config() { # @arg clients+[`_choice_client`] test-clients() { for c in "${argc_clients[@]}"; do - echo "### $c streaming" + echo "### $c stream" aichat -m "$c" 1 + 2 = ? - echo "### $c non-streaming" + echo "### $c non-stream" aichat -m "$c" -S 1 + 2 = ? done } # @cmd Test proxy server -# @option --model=default +# @option -m --model=default +# @flag -S --no-stream # @arg text~ test-server() { - argc generic-chat \ + args=() + if [[ -n "$argc_no_stream" ]]; then + args+=("-S") + fi + argc generic-chat "${args[@]}" \ --api-base http://localhost:8000/v1 \ --model $argc_model \ "$@" -- cgit v1.2.3