diff options
| author | sigoden <sigoden@gmail.com> | 2024-05-23 19:28:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-23 19:28:56 +0800 |
| commit | 5458150ed3203cf13b0371efa2c791ac696cee93 (patch) | |
| tree | 702d17039d9677246a3b91deb8243e09cd768402 /Argcfile.sh | |
| parent | 2ccbb0f06a4558e15642feb53ba7b2bd72804820 (diff) | |
| download | aichat-5458150ed3203cf13b0371efa2c791ac696cee93.tar.gz | |
fix: json stream parser and refine client modules (#538)
Diffstat (limited to 'Argcfile.sh')
| -rwxr-xr-x | Argcfile.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Argcfile.sh b/Argcfile.sh index 88615f9..3b29cda 100755 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -217,12 +217,7 @@ chat-cohere() { -X POST \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $COHERE_API_KEY" \ ---data '{ - "model": "'$argc_model'", - "message": "'"$*"'", - "stream": '$stream' -} -' +-d "$(_build_body cohere "$@")" } # @cmd List cohere models @@ -470,6 +465,13 @@ _build_body() { "stream": '$stream' }' ;; + cohere) + echo '{ + "model": "'$argc_model'", + "message": "'"$*"'", + "stream": '$stream' +}' + ;; claude) echo '{ "model": "'$argc_model'", |
