ITADN

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

#1738Opennanditamohan 创建于 2023-05-22
N
nanditamohancommented
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: https://github.com/openai/openai-python/issues/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!
0 条评论