Skip to content

Commit 473f78f

Browse files
committed
feat: update readme
1 parent 1968022 commit 473f78f

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

README.md

+9-12
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ Azure OpenAI Service Proxy. Convert Azure OpenAI API(aoai) to the official OpenA
77

88
To successfully make a call against Azure OpenAI, you'll need the following:
99

10-
| Name | Desc | Example |
10+
| Name | Desc | Default |
1111
| --------------------- | ------------------------------------------------------------ | ----------------------------- |
12-
| AZURE_OPENAI_ENDPOINT | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in **Azure OpenAI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`. | https://test.openai.azure.com |
13-
| AZURE_OPENAI_API_VER | [See here](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/quickstart?tabs=command-line&pivots=rest-api) or Azure OpenAI Studio | 2023-03-15-preview |
14-
| AZURE_OPENAI_DEPLOY | This value will correspond to the custom name you chose for your deployment when you deployed a model. This value can be found under **Resource Management** > **Deployments** in the Azure portal or alternatively under **Management** > **Deployments** in Azure OpenAI Studio. | gpt-35-turbo |
12+
| AZURE_OPENAI_ENDPOINT | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in **Azure OpenAI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`. | N |
13+
| AZURE_OPENAI_API_VER | [See here](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/quickstart?tabs=command-line&pivots=rest-api) or Azure OpenAI Studio | 2023-03-15-preview |
14+
| AZURE_OPENAI_MODEL_MAPPER | This value will correspond to the custom name you chose for your deployment when you deployed a model. This value can be found under **Resource Management** > **Deployments** in the Azure portal or alternatively under **Management** > **Deployments** in Azure OpenAI Studio. | gpt-3.5-turbo=gpt-3.5-turbo |
15+
16+
> Model Mapper convert OpenAI offical Standard model name to Azure Deployment Model Name.
1517
1618
![Screenshot of the overview UI for an OpenAI Resource in the Azure portal with the endpoint & access keys location circled in red.](docs/assets/images/endpoint.png)
1719

@@ -25,7 +27,7 @@ API Key: This value can be found in the **Keys & Endpoint** section when examini
2527
docker run -d -p 8080:8080 --name=azure-openai-proxy \
2628
--env AZURE_OPENAI_ENDPOINT=your_azure_endpoint \
2729
--env AZURE_OPENAI_API_VER=your_azure_api_ver \
28-
--env AZURE_OPENAI_DEPLOY=your_azure_deploy \
30+
--env AZURE_OPENAI_MODEL_MAPPER=your_azure_deploy_mapper \
2931
stulzq/azure-openai-proxy:latest
3032
````
3133

@@ -61,7 +63,7 @@ Envs:
6163

6264
- `OPENAI_API_KEY` Auzre OpenAI API Key
6365
- `AZURE_OPENAI_ENDPOINT` Auzre OpenAI API Endpoint
64-
- `AZURE_OPENAI_DEPLOY` Auzre OpenAI API Deployment
66+
- `AZURE_OPENAI_MODEL_MAPPER` Auzre OpenAI API Deployment
6567

6668
docker-compose.yml:
6769

@@ -92,7 +94,7 @@ services:
9294
- 8080:8080
9395
environment:
9496
AZURE_OPENAI_ENDPOINT: <Auzre OpenAI API Endpoint>
95-
AZURE_OPENAI_DEPLOY: <Auzre OpenAI API Deployment>
97+
AZURE_OPENAI_MODEL_MAPPER: <Auzre OpenAI API Deployment Mapper>
9698
AZURE_OPENAI_API_VER: 2023-03-15-preview
9799
networks:
98100
- chatgpt-ns
@@ -108,8 +110,3 @@ Run:
108110
docker compose up -d
109111
````
110112

111-
## Proxy Api
112-
113-
| Api | Status |
114-
| -------------------- | ------ |
115-
| /v1/chat/completions | Ok |

azure/init.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ var (
2121
AzureOpenAIAPIVer = ""
2222

2323
AzureOpenAIModelMapper = map[string]string{
24-
"gpt-3.5-turbo": "gpt-35-turbo",
25-
"gpt-3.5-turbo-0301": "gpt-35-turbo-0301",
24+
"gpt-3.5-turbo": "gpt-35-turbo",
2625
}
2726
fallbackModelMapper = regexp.MustCompile(`[.:]`)
2827
)

0 commit comments

Comments
 (0)