mirror of
https://github.com/zhengkai/orca.git
synced 2026-02-16 19:42:27 +08:00
limit
This commit is contained in:
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!"}]
|
||||
}'
|
||||
Reference in New Issue
Block a user