You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An Azure OpenAI API proxy tool that can convert OpenAI API requests into Azure OpenAI API requests, allowing applications that only support OpenAI to seamlessly use Azure Open AI.
6
+
7
+
## Usage Requirements
8
+
9
+
You must have an Azure OpenAI account to use the Azure OpenAI Proxy.
10
+
11
+
## Docker Deployment
12
+
`docker run -d -p 3080:3080 scalaone/azure-openai-proxy`
13
+
14
+
## Local Running and Testing, Command Line Method
15
+
16
+
1. Install NodeJS 18.
17
+
2. Clone the code in the command line window.
18
+
3. Run `npm install` to install dependencies.
19
+
4. Run `npm start` to start the application.
20
+
5. Run the script below for testing, replacing `YOUR_RESOURCE_ID`, `YOUR_MODEL_DEPLOYMENT`, and `YOUR_API_KEY` before running it.
Azure-OpenAI-Proxy is an application that serves as a proxy for OpenAI's API. It enables users to request AI-generated text completions for specific prompts, using different models and parameters. The proxy supports GPT-4 models in addition to other available models. It simplifies the interaction with the OpenAI API and helps manage multiple deployments with ease for your AI-based text generation applications.
3
+
[English](./README.en-US.md) | 简体中文
4
4
5
-
## Installation
5
+
一个 Azure OpenAI API 代理工具,能将 OpenAI API 请求转换为 Azure OpenAI API 请求,使仅支持 OpenAI 的应用程序可以无缝地使用 Azure Open AI。
`docker run -d -p 3080:3080 scalaone/azure-openai-proxy`
26
13
27
-
4. Replace the placeholder values in the example request as mentioned in the [Usage section](#usage) with your actual resource ID, deployment IDs, model names, and API key.
14
+
## 本地运行和测试,命令行方式
28
15
29
-
5. Run the application:
30
-
31
-
```
32
-
npm run start
33
-
```
34
-
35
-
The Azure-OpenAI-Proxy will be running on your server and listening for incoming requests.
36
-
37
-
## Usage
38
-
39
-
To send a request, use a `curl` command to POST the input data to the application's URL. Replace the placeholder values with your actual resource ID, deployment IDs, model names, and API key.
-`messages`: An array of message objects containing `content` and `role` properties. The `content` represents the text input, and the `role` can be one of the following options: `'system'`, `'user'`, or `'assistant'`.
71
-
-`temperature`: Controls the randomness of generated completions. Higher values (e.g., 1) result in more random responses, while lower values (e.g., 0.1) produce more focused and deterministic responses.
72
-
-`model`: Specifies the AI model to be used for generating completions. In the example, it is set to `'gpt-3.5-turbo'`.
73
-
-`stream`: A boolean value indicating whether the response should be streamed.
54
+
A: 可以在Azure的管理门户里查找,具体见下图标注
74
55
75
-
## License
56
+

76
57
77
-
This project is licensed under the MIT License. See the [LICENSE](https://choosealicense.com/licenses/mit/) file for details.
58
+
Q: 如何支持GPT-4
78
59
79
-
## Contributing
60
+
A: 要使用GPT-4, 请使用下列格式的key:
80
61
81
-
Contributions to Azure-OpenAI-Proxy are greatly appreciated. To contribute, follow these steps:
0 commit comments