liuyuqi-dellpc 1 year ago
parent
commit
4bac23e8f2
3 changed files with 28 additions and 6 deletions
  1. 6 2
      README.md
  2. 18 0
      ai.http
  3. 4 4
      docker-compose.debug.yml

+ 6 - 2
README.md

@@ -5,12 +5,16 @@ this is a openai-proxy, using ngixn proxy.
 ## Develop
 
 ```conf
-docker build -t jianboy/aitakegpt:latest .
-docker-compose up -d
+docker compose -f "openai-proxy/docker-compose.debug.yml" up -d --build
 ```
 
 ## Usage
 
+```
+wget https://git.yoqi.me/lyq/openai-proxy/raw/master/docker-compose.yml
+docker-compose up -d
+```
+
 ```python
 import openai
 openai.api_key = api_key

+ 18 - 0
ai.http

@@ -0,0 +1,18 @@
+
+@token=sk-sss
+
+### gpt-3.5-turbo proxy
+POST /v1/chat/completions HTTP/1.1
+Content-Type: application/json
+Authorization: Bearer {{token}}
+Host: ai.takegpt.cn
+
+{
+    "model": "gpt-3.5-turbo",
+    "messages": [{
+        "role": "user", 
+        "content": "宝宝每天咳几声正常吗"
+     }],
+	 "stream" : true,
+    "temperature": 0.5
+}

+ 4 - 4
docker-compose.debug.yml

@@ -6,8 +6,8 @@ services:
     build:
       context: .
       dockerfile: ./Dockerfile
-    environment:
-      JAVA_OPTS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005,quiet=y
     ports:
-      - 3000:3000
-      - 5005:5005
+      - 80:80
+    volumes:
+      - ./ai.takegpt.cn.conf:/etc/nginx/conf.d/ai.takegpt.cn.conf
+    restart: unless-stopped