diff options
| author | sigoden <sigoden@gmail.com> | 2024-12-06 18:14:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-06 18:14:43 +0800 |
| commit | b164a1587deff738d04a75665bdb863d82b3264c (patch) | |
| tree | 556e94d58e378246a736c638705abd84e9b40e81 /Argcfile.sh | |
| parent | 5f7edc0ded187d86712639f3f7c48e6e4d72927b (diff) | |
| download | aichat-b164a1587deff738d04a75665bdb863d82b3264c.tar.gz | |
feat: update cohere api to v2 (#1041)
Diffstat (limited to 'Argcfile.sh')
| -rwxr-xr-x | Argcfile.sh | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Argcfile.sh b/Argcfile.sh index c192232..c9fb34a 100755 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -250,7 +250,7 @@ chat-claude() { # @flag -S --no-stream # @arg text~ chat-cohere() { - _wrapper curl -i https://api.cohere.ai/v1/chat \ + _wrapper curl -i https://api.cohere.ai/v2/chat \ -X POST \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $COHERE_API_KEY" \ @@ -398,7 +398,7 @@ _build_body() { else shift case "$kind" in - openai) + openai|cohere) echo '{ "model": "'$argc_model'", "messages": [ @@ -410,13 +410,6 @@ _build_body() { "stream": '$stream' }' ;; - cohere) - echo '{ - "model": "'$argc_model'", - "message": "'"$*"'", - "stream": '$stream' -}' - ;; claude) echo '{ "model": "'$argc_model'", |
