File size: 846 Bytes
fd11f30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@echo off

rem =====================================================================

rem  Send one request to the rkllm3-server started by rknn\start.cmd.

rem  Usage: send_vlm_req.cmd <name> [port]

rem    <name>  req_<name>.json must exist next to this script

rem    [port]  default 8899 (matches rknn\start.cmd RK_PORT default)

rem  IMPORTANT: keep this file pure ASCII + CRLF.

rem =====================================================================
setlocal
set "BASE=%~dp0"
set "NAME=%~1"
if "%NAME%"=="" set "NAME=orange"
set "PORT=%~2"
if "%PORT%"=="" set "PORT=8899"
curl.exe -s -X POST http://127.0.0.1:%PORT%/v1/chat/completions -H "Content-Type: application/json" --data-binary "@%BASE%req_%NAME%.json" -o "%BASE%resp_%NAME%.json" -w "HTTP=%%{http_code} TIME=%%{time_total}s PORT=%PORT%" --max-time 180
echo.
exit /b 0