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

[Feature]: Support for Azure OpenAI #568

Open
amrit2cisco opened this issue Nov 13, 2023 · 2 comments
Open

[Feature]: Support for Azure OpenAI #568

amrit2cisco opened this issue Nov 13, 2023 · 2 comments

Comments

@amrit2cisco
Copy link

amrit2cisco commented Nov 13, 2023

Is your feature request related to a problem? Please describe.

We are currently using Azure OpenAI to make API calls, seems that GPTCache only supports using the standard OpenAI API keys and it isn't possible to route the requests through Azure

Describe the solution you'd like.

OpenAI's library allows us to specify to route the requests through Azure with the following config:

openai.api_type = "azure"
openai.api_version = "2023-05-15"
openai.api_key = "<api key>"
openai.api_base = "https://<tenant>.openai.azure.com/"
model = "gpt-35-turbo"

Including support to do this through the GPTCache OpenAI adapter would be the way to replicate the same for GPTCache

Describe an alternate solution.

N/A

Anything else? (Additional Context)

No response

@SimFG
Copy link
Collaborator

SimFG commented Nov 14, 2023

@amrit2cisco Do you mean to also introduce these constants in the openai file under gptcache?

@amrit2cisco
Copy link
Author

@SimFG yes, and particularly the Azure OpenAI API key (which is fundamentally different from the vanilla OpenAI API Key) should be able to be used to route the requests to api_base in the absence of a standard OpenAI API key

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

No branches or pull requests

2 participants