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

Create AOAI deployment with cogservices create API without passing in account (instead pass key + endpoint) #1738

Open
nanditamohan opened this issue May 22, 2023 · 0 comments

Comments

@nanditamohan
Copy link

I want to create a AOAI model deployment using this API, since its the only one which supports deployment_name being set (OAI api does not support this: openai/openai-python#457):

I was suggested to do this:

from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
client = CognitiveServicesManagementClient(credential=<credential>, subscription_id=<subscription_id>)

deployment = client.deployments.begin_create_or_update(
    resource_group_name="<resource_group_name>",
    account_name="<account_name>",
    deployment_name="<deployment_name>",
    deployment={
        "properties": {
          "model": {
            "format": "OpenAI",
            "name": "<model name>",
            "version": "<model version>"
          },
          "scaleSettings": {
            "scaleType": "Standard"
          }
        }
    }
)

However, what I'm building does not have access to the Cog Services account name and rg, sub - but only has the AzureML subscription, resourceGroup as well as AzureOpenAI account base, key, version and type. Is there a way to use this library to create a deployment with that information instead of account info?

Thanks for the help!

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

1 participant