This commit is contained in:
Zheng Kai
2023-08-01 15:08:01 +08:00
parent e18c1db55e
commit 71ec1811e1
13 changed files with 110 additions and 17 deletions

9
misc/test/moderations.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
BASE="${OPENAI_API_BASE:-https://api.openai.com/v1}"
curl -v "${BASE}/moderations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
-d '{"input": "你媽逼啊"}' \
| jq . -