-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest-curl-cmds.sh
28 lines (25 loc) · 1021 Bytes
/
test-curl-cmds.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# OpenAI API Chat Completions Endpoint
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {YOUR_OPENAI_API_KEY}" \
-d '{
"model": "gpt-3.5-turbo",
"max_tokens":256,
"messages": [{"role": "system", "content": "You are a developer."}, {"role": "user", "content": "What is Appsmith?"}]
}'
# Test without token
curl http://localhost:9080/ask-me-anything -X POST -d ' \
{
"model": "gpt-3.5-turbo",
"max_tokens":256,
"messages": [{"role": "system", "content": "You are a developer."}, {"role": "user", "content": "What is Appsmith?"}]
}'
# Claim a new JWT token
curl -i http://localhost:9080/[email protected] -i
# Test with JWT token
curl -i http://localhost:9080/ask-me-anything -H 'Authorization: {YOUR_OPENAI_API_KEY}' -X POST -d '
{
"model": "gpt-3.5-turbo",
"max_tokens":256,
"messages": [{"role": "system", "content": "You are a developer."}, {"role": "user", "content": "What is Appsmith?"}]
}'