mirror of
https://github.com/zhengkai/orca.git
synced 2026-02-11 23:32:27 +08:00
limit
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
BASE="${OPENAI_API_BASE:-https://api.openai.com/v1}"
|
||||
|
||||
curl "${BASE}/chat/completions" \
|
||||
curl -v "${BASE}/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY} no-cache" \
|
||||
-d '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"messages": [{"role": "user", "content": "Hello!"}]
|
||||
|
||||
14
misc/test/direct.sh
Executable file
14
misc/test/direct.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
OPENAI_API_KEY="sk-rhjeVT1fkcuarBKnQR6ST$(cat ~/.config/openai)"
|
||||
export OPENAI_API_KEY
|
||||
|
||||
BASE="https://api.openai.com/v1"
|
||||
|
||||
curl -v "${BASE}/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
|
||||
-d '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"messages": [{"role": "user", "content": "Hello!"}]
|
||||
}'
|
||||
3
misc/test/local-chat.sh
Executable file
3
misc/test/local-chat.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
OPENAI_API_BASE=http://localhost:22035/v1 ./chat.sh
|
||||
9
misc/test/moderations.sh
Executable file
9
misc/test/moderations.sh
Executable 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 . -
|
||||
Reference in New Issue
Block a user