mirror of
https://github.com/zhengkai/orca.git
synced 2026-02-04 15:02:26 +08:00
up
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
SHELL:=/bin/bash
|
||||
|
||||
TARGET_HOST:=lamia
|
||||
RACHEL_HOST:=rachel
|
||||
|
||||
include ../../server/build/env.sh
|
||||
|
||||
@@ -26,6 +27,14 @@ install: build
|
||||
ssh $(TARGET_HOST) "chmod +x /tmp/install.sh && /tmp/install.sh && rm /tmp/install.sh"
|
||||
ssh $(TARGET_HOST) "rm /tmp/env.sh"
|
||||
|
||||
rachel: build
|
||||
sudo docker save orca > docker-orca.tar
|
||||
scp docker-orca.tar $(RACHEL_HOST):/tmp
|
||||
scp install.sh $(RACHEL_HOST):/tmp
|
||||
scp ../../server/build/env.sh $(RACHEL_HOST):/tmp
|
||||
ssh $(RACHEL_HOST) "chmod +x /tmp/install.sh && /tmp/install.sh && rm /tmp/install.sh"
|
||||
ssh $(RACHEL_HOST) "rm /tmp/env.sh"
|
||||
|
||||
nginx:
|
||||
scp ../nginx/prod.conf lamia:/etc/nginx/vhost.d/600-orca
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ BASE="${OPENAI_API_BASE:-https://api.openai.com/v1}"
|
||||
|
||||
curl -v "${BASE}/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY} no-cache" \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
|
||||
-d '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"messages": [{"role": "user", "content": "Hello!"}]
|
||||
|
||||
@@ -6,9 +6,10 @@ 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!"}]
|
||||
}'
|
||||
-w "Total time: %{time_total} seconds\n" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
|
||||
-d '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"messages": [{"role": "user", "content": "Hello!"}]
|
||||
}'
|
||||
|
||||
6
misc/test/models-list.sh
Executable file
6
misc/test/models-list.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
OPENAI_API_KEY="sk-rhjeVT1fkcuarBKnQR6ST$(cat ~/.config/openai)"
|
||||
|
||||
curl https://api.openai.com/v1/models \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY}"
|
||||
Reference in New Issue
Block a user