Closed jonrzhang closed 6 months ago
Hi @jonrzhang Thank you for contributing! I went through the Azure OpenAI docs and I see that changing the address would require a little more than changing the base url. To be specific the url for a request to Azure OpenAI is
https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/completions?api-version=2022-12-01\
You can see the example request in the middle of the page.
YOUR_RESOURCE_NAME, YOUR_DEPLOYMENT_NAME and the api version date being variables the user would have to provide.
The way I would implement this is have these YOUR_RESOURCE_NAME, YOUR_DEPLOYMENT_NAME
as variables that the user should provide as arguments when starting the script. If the user provides a value for these, then the azure url is build and set as the url value instead of the OpenAI default. Is this something you are willing to explore?
Since the OpenAI can be run on Azure, and for further API may replace by other self proxy use. I suggest replacing the fixed API address with defined a variable.
And I try to add a new parameter to specify the API address in case needs to be replaced.