acheong08 / ChatGPT

Reverse engineered ChatGPT API
GNU General Public License v2.0
28k stars 4.48k forks source link

Update Azure API #1440

Closed luping-liu closed 1 year ago

luping-liu commented 1 year ago

Hello, I am having an issue with support for Azure API on issue #1342. The original version does not seem to be working. To solve this issue, I have updated the function ask_stream based on the Azure office introduction.

Now, users can use Azure chatgpt API by adding API_URL="your Endpoint" MODEL_NAME="your deployment name".

The Azure office introduction: https://learn.microsoft.com/en-us/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line&pivots=rest-api