Skip to content

Commit 6fcfac2

Browse files
author
AiQL.com
authoredOct 13, 2024··
Update README.md
1 parent a0d36cd commit 6fcfac2

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed
 

‎README.md

+28-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# OpenAI Proxy Docker
22

3-
OpenAI will block API access in some countries from July 2024.
4-
The `openai-proxy-docker` provides an OpenAI API proxy server image by [Docker](https://hub.docker.com/r/aiql/openai-proxy-docker)
3+
This repository provides a Dockerized proxy for accessing the OpenAI API, allowing for simplified and streamlined interaction with the model.
4+
5+
With the [Docker image](https://hub.docker.com/r/aiql/openai-proxy-docker), you can easily deploy a proxy instance to serve as a gateway between your application and the OpenAI API, reducing the complexity of API interactions and enabling more efficient development.
6+
7+
## Use case
8+
9+
1. For users who are restricted from direct access to the OpenAI API, particularly those in countries where OpenAI will be blocking API access starting July 2024
10+
2. For users who need to access private APIs that lack Cross-Origin Resource Sharing (CORS) headers, this solution provides a proxy to bypass CORS restrictions and enable seamless API interactions.
511

612
## Demo
713

@@ -64,10 +70,27 @@ Normally, the step should be:
6470

6571
## Docker Compose
6672

67-
This is an example if you want to use this for your own domain with HTTPS:
73+
### Example 1
74+
You can apply this approach to other APIs, such as Nvidia NIM:
75+
- The proxied Nvidia NIM Completion API will be: `YOURIP:9101/v1/chat/completions`
76+
> For convenience, a readily available API is provided for those who prefer not to deploy it independently: `https://nvidia.aiql.com/v1/chat/completions`
77+
78+
```DOCKERFILE
79+
nvidia-proxy:
80+
image: aiql/openai-proxy-docker:latest
81+
container_name: nvidia-proxy
82+
environment:
83+
PORT: "9101"
84+
TARGET: "https://integrate.api.nvidia.com"
85+
restart: always
86+
network_mode: host
87+
```
88+
89+
### Example 2
90+
You can apply this approach with your own domain over HTTPS:
6891
- `YOUREMAILADDR@example.com` will be used to get certification notification from ACME server
69-
- `api.example.com` will be your URL
70-
> e.g.: the proxied OpenAI Chat Completion API will be: `api.example.com/v1/chat/completions`
92+
- The proxied OpenAI Chat Completion API will be: `api.example.com/v1/chat/completions`
93+
> `api.example.com` should be replaced by your domain name
7194
7295
```DOCKERFILE
7396
services:

0 commit comments

Comments
 (0)
Please sign in to comment.