GPTutor / gptutor-extension

MIT License
41 stars 6 forks source link

Azure OpenAI Support #2

Closed jimmylevell closed 10 months ago

jimmylevell commented 1 year ago

We are considering to make your software available for our junior developers to help them to improve their coding skills.

Therefore, I have been exploring the different GPT integrations that are available. I am particularly interested in using Azure Open AI for this projects, but I have not been able to find any information on whether your software supports it or if there are any plans to do so in the future.

Could you please let me know if there are any plans to support Azure Open AI? If not, are there any workarounds that I could use to integrate it into my projects?

Thank you for your help.

EasonC13 commented 1 year ago

Hi @jimmylevell, we certainly will support other Large Language Models and endpoints in the future. Thank you for letting us know that you are interested in integrating Azure Open AI. If possible, we would appreciate it if you could provide some sample code examples and using scenarios for using Azure OpenAI API to help us with the integration.

hdiabi-via commented 12 months ago

@EasonC13 Here is a proposed solution to make the extension compatible with Azure OpenAI:

  1. Implement a configuration option to make the OpenAI library base URL configurable. This will allow users to easily specify their own Azure OpenAI deployment URL. You can refer to the configuration.ts file in the GitHub repository to identify the relevant code section that needs modification.

  2. Update the readme file to provide instructions for users who want to use their own Azure OpenAI deployment. Suggest deploying a proxy that can convert OpenAI API calls to Azure API calls. You can mention a specific project, such as azure-openai-proxy, which I have personally used to successfully convert OpenAI calls to Azure calls.

By implementing these changes, users will have the flexibility to utilize their own Azure OpenAI deployment with the extension. This solution promotes compatibility and allows users to seamlessly integrate Azure OpenAI functionality into their workflows.

EasonC13 commented 12 months ago

@hdiabi-via Thank you for your suggestion. Will do it when I have time.

EasonC13 commented 12 months ago

@hdiabi-via @jimmylevell I had updated it in this commit https://github.com/GPTutor/gptutor-extension/commit/dfc3291afb0d1d66dd19923c6a9afc7d287dc6b4 with v1.0.3

Hope you can try it by Setting -> Set Model Parameters -> Base Path

image

Let me know if it works or not, so I can close this issue.