from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()
client = CognitiveServicesManagementClient(credential, subscription_id="subscriptionId")
deployment =client.deployments.get(resource_group_name="resourceGroupName", account_name="accountName", deployment_name="deploymentName")
properties = deployment.properties
print("Model name:", properties.model.name)
print("Model version:", properties.model.version)
print("Tokens per Minute Rate Limit (thousands):",properties.rate_limits[0].count)
print("Rate limit (Tokens per minute):",properties.rate_limits[1].count)
print("Rate limit (Requests per minute):", properties.rate_limits[0].count * 6)
字符串
输出:
Model name: xxx
Model version: 1
Tokens per Minute Rate Limit (thousands): 33.0
Rate limit (Tokens per minute): 33000.0
Rate limit (Requests per minute): 198.0
1条答案
按热度按时间nzrxty8p1#
我想获取一个模型的属性,该模型使用Python部署在Azure OpenAI中。
您可以使用下面的Python代码,通过Azure Python SDK获取**
properties
**的Azure开放式人工智能部署。产品代码:
字符串
输出:
型
x1c 0d1x的数据
参考:
部署-获取- REST API(Azure认知服务)|微软学习