Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality to allow the use of GPT on a Microsoft Azure instance #258

Merged

Conversation

sweetlilmre
Copy link
Contributor

Functionality is controlled through a switch in the .env configuration:
USE_AZURE=False
OPENAI_API_BASE=your-base-url-for-azure
OPENAI_API_VERSION=api-version-for-azure
OPENAI_DEPLOYMENT_ID=deployment-id-for-azure

Set USE_AZURE to True and fill in the appropriate values as detailed here: https://pypi.org/project/openai/ in the Microsoft Azure Endpoints section

@blankey1337
Copy link
Contributor

blankey1337 commented Apr 6, 2023

This broke the project for me.

Here's the error:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_requestor.py", line 528, in request_raw raise error.APIConnectionError( openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL 'your-base-url-for-azure/openai/deployments/deployment-id-for-azure/chat/completions?api-version=api-version-for-azure': No scheme supplied.

Seems to add a hard dependency on azure openai.

@sweetlilmre
Copy link
Contributor Author

This broke the project for me.

Here's the error: File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_requestor.py", line 528, in request_raw raise error.APIConnectionError( openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL 'your-base-url-for-azure/openai/deployments/deployment-id-for-azure/chat/completions?api-version=api-version-for-azure': No scheme supplied.

Seems to add a hard dependency on azure openai.

You are correct, apologies, bool eval was broken, I'll push a fix now

@Torantulino Torantulino closed this Apr 6, 2023
@Torantulino Torantulino reopened this Apr 6, 2023
@Torantulino Torantulino merged commit a9451f4 into Significant-Gravitas:master Apr 6, 2023
@sweetlilmre sweetlilmre deleted the add-azure-compat branch April 6, 2023 11:44
waynehamadi added a commit that referenced this pull request Sep 5, 2023
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants