From a276027bcfd4c44bd64dfcc9ae275f19c035bba2 Mon Sep 17 00:00:00 2001 From: Jerry Tian Date: Thu, 10 Apr 2025 00:48:16 -0400 Subject: [PATCH] test: test streaming API --- .../api_scripts/tuzi_api_test.sh | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/apps/demo-nextjs-app-router/api_scripts/tuzi_api_test.sh b/apps/demo-nextjs-app-router/api_scripts/tuzi_api_test.sh index c9db586..afb5748 100644 --- a/apps/demo-nextjs-app-router/api_scripts/tuzi_api_test.sh +++ b/apps/demo-nextjs-app-router/api_scripts/tuzi_api_test.sh @@ -13,21 +13,53 @@ # ], # "stream": false # }' +# +# echo + +# curl -v --location --request POST 'https://animator-gg-api.ca2324.servep2p.com:8443/api/fal/proxy' \ +# --header 'Content-Type: application/json' \ +# --header 'x-fal-target-url: https://api.tu-zi.com/v1/chat/completions' \ +# --data-raw '{ +# "model": "gpt-4-gizmo-g-2fkFE8rbu", +# "messages": [ +# { +# "role": "user", +# "content": "你是谁" +# } +# ], +# "stream": false +# }' # echo +# curl --location --request POST 'https://api.tu-zi.com/v1/chat/completions' \ +# --header 'Authorization: Bearer sk-...' \ +# --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \ +# --header 'Content-Type: application/json' \ +# --header 'Accept: */*' \ +# --header 'Host: api.tu-zi.com' \ +# --header 'Connection: keep-alive' \ +# --data-raw '{ +# "stream": true, +# "model":"gpt-4o-image-vip", +# "messages": [ +# { +# "content": "画个牛马,让马的脸上遮个布", +# "role": "user" +# } +# ] +# }' + curl -v --location --request POST 'https://animator-gg-api.ca2324.servep2p.com:8443/api/fal/proxy' \ --header 'Content-Type: application/json' \ --header 'x-fal-target-url: https://api.tu-zi.com/v1/chat/completions' \ --data-raw '{ - "model": "gpt-4-gizmo-g-2fkFE8rbu", + "stream": true, + "model":"gpt-4o-image-vip", "messages": [ { - "role": "user", - "content": "你是谁" + "content": "画个牛马,让马的脸上遮个布", + "role": "user" } - ], - "stream": false -}' - -echo \ No newline at end of file + ] +}' \ No newline at end of file