This commit is contained in:
Zheng Kai
2023-06-13 17:44:37 +08:00
parent b1f64df227
commit 5393e78e3e
4 changed files with 15 additions and 23 deletions

View File

@@ -1,10 +1,10 @@
#!/bin/bash -ex
API_HOST="http://localhost:22035"
BASE="${OPENAI_API_BASE:-https://api.openai.com/v1}"
curl "${API_HOST}/v1/chat/completions" \
curl "${BASE}/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]