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

Adding support for OpenAI API on Azure platform #80

Closed
slgphantom opened this issue Mar 24, 2023 · 17 comments
Closed

Adding support for OpenAI API on Azure platform #80

slgphantom opened this issue Mar 24, 2023 · 17 comments
Labels
enhancement New feature or request

Comments

@slgphantom
Copy link

Topic:
Adding support for OpenAI API on Azure platform

Summary:
Allow for integration of OpenAI API on the Azure platform to enable users in geoblocked regions, such as Hong Kong, to access the capabilities of OpenAI.

Details:

  • Some regions, such as Hong Kong, cannot directly access OpenAI API due to geoblocks. However, they can use Azure's version of the APIs.
  • Users have tried to change the custom API address to their endpoints but are encountering a 404 error.
  • There may be minor parameter differences between the direct API from OpenAI and Azure's version that are causing the issue.
  • Therefore, the request is to add support for OpenAI API on the Azure platform, either by addressing the parameter differences or providing clear guidelines on how to use OpenAI API on Azure.
@josStorer josStorer added the enhancement New feature or request label Mar 24, 2023
josStorer added a commit that referenced this issue Apr 5, 2023
@josStorer
Copy link
Owner

try v2.2.1

@josStorer josStorer reopened this Apr 5, 2023
@PeterDaveHello
Copy link
Contributor

Not sure if there's a way to easily debug, trying to verify if it works but hanging on "Waiting for response..." when every config looks fine.

If the Azure Endpoint is wrong, will get "Network Error". If the deploy name is wrong, will get "Request failed with status code 404". So it doesn't look like the config is wrong. (and the config is tested somewhere else working)

image

@josStorer
Copy link
Owner

Go to extension page and check if there are any errors appearing

@PeterDaveHello
Copy link
Contributor

Haven't saw any error yet, btw, the Stop doesn't seem to work. It'll keep showing "Waiting for response..." even when I switched to Open AI API 😅 (but the name did change, which may be a bug? As the model can't be change after message sent)

image

@josStorer
Copy link
Owner

Open the service worker, you should be able to see some debug messages, take a screenshot of the part containing sse message and send it to me.

@PeterDaveHello
Copy link
Contributor

Not sure if this helps, I didn't see something called sse message, but maybe I didn't do it right, so I cleared the logs and console before message sent, and collect the console and request log, which should be clean enough:

image

image

(and I also tested OpenAI API, which works without problems 👍 )

@josStorer
Copy link
Owner

The problem at the moment is that I do not have Azure OpenAI access for debugging 😂

@PeterDaveHello
Copy link
Contributor

@josStorer maybe I can help with that, can you email me or DM me on Twitter/Telegram? (Shouldn't be hard to find the address/ID, but let's don't directly paste it, to prevent spam)

@josStorer
Copy link
Owner

I will contact you via Twitter tomorrow, it's a bit late today.
Thank you very much for being willing to help me debug this problem.

@josStorer
Copy link
Owner

@PeterDaveHello I seem to be unable to DM you on Twitter, we may need to follow each other.

@PeterDaveHello
Copy link
Contributor

Just sent you a message ;)

@josStorer
Copy link
Owner

@slgphantom @PeterDaveHello v2.2.2 it should work now

A known issue currently is that the process is blocked during the request, causing inability to stop when using Azure. I haven't found an effective solution yet, but Azure API runs very fast, so there are no significant problems with the user experience.

@PeterDaveHello
Copy link
Contributor

Thanks, the speed is exactly reason I'd like to use it 😍

@PeterDaveHello
Copy link
Contributor

PeterDaveHello commented Apr 6, 2023

@josStorer is the version on AMO(addons.mozilla.org) and Chrome Store waiting for some kind of review to be updated to the latest version? v2.2.1 and v2.2.0 on them right now. (or need some manual works I guess?)

@josStorer
Copy link
Owner

yes, store reviews are slow except for firefox, i plan to fix the stop issue tonight and then submit

@josStorer
Copy link
Owner

A known issue currently is that the process is blocked during the request, causing inability to stop when using Azure. I haven't found an effective solution yet, but Azure API runs very fast, so there are no significant problems with the user experience.

fixed in v2.2.3

@PeterDaveHello
Copy link
Contributor

It's working now 😀 Thank you!

josStorer added a commit that referenced this issue Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants