mirror of
https://github.com/zhengkai/orca.git
synced 2026-02-04 15:02:26 +08:00
test
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
API_HOST="http://10.0.84.49:22035"
|
||||
|
||||
curl "${API_HOST}/v1/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $OPENAI_API_KEY" \
|
||||
-d '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"messages": [{"role": "user", "content": "Hello!"}]
|
||||
}'
|
||||
@@ -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!"}]
|
||||
|
||||
12
misc/test/completion.sh
Executable file
12
misc/test/completion.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
BASE="${OPENAI_API_BASE:-https://api.openai.com/v1}"
|
||||
curl "${BASE}/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
|
||||
-d '{
|
||||
"model": "text-davinci-003",
|
||||
"prompt": "Say this is a test",
|
||||
"max_tokens": 7,
|
||||
"temperature": 0
|
||||
}'
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
# API_HOST="http://10.0.84.49:22035"
|
||||
API_HOST="http://localhost:22035"
|
||||
|
||||
curl "${API_HOST}/v1/engines/text-embedding-ada-002/embeddings" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $OPENAI_API_KEY" \
|
||||
-d '{"input":[ "\u80fd\u91cf\u793c\u7269\u662f\u600e\u4e48\u56de\u4e8b\uff1f\u7528\u4e2d\u6587"], "encoding_format": "base64"}'
|
||||
Reference in New Issue
Block a user