You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike the previous Python SDK commands in this tutorial, since the introduction of the quota feature, model deployment must be done using the [REST API](/rest/api/cognitiveservices/accountmanagement/deployments/create-or-update?tabs=HTTP), which requires separate authorization, a different API path, and a different API version.
@@ -504,6 +611,8 @@ It isn't uncommon for this process to take some time to complete when dealing wi
504
611
505
612
After your fine-tuned model is deployed, you can use it like any other deployed model in either the [Chat Playground of Azure OpenAI Studio](https://oai.azure.com), or via the chat completion API. For example, you can send a chat completion call to your deployed model, as shown in the following Python example. You can continue to use the same parameters with your customized model, such as temperature and max_tokens, as you can with other deployed models.
506
613
614
+
# [OpenAI Python 0.28.1](#tab/python)
615
+
507
616
```python
508
617
#Note: The openai-python library support for Azure OpenAI is in preview.
model="gpt-35-turbo-ft", # model = "Custom deployment name you chose for your fine-tuning model"
653
+
messages=[
654
+
{"role": "system", "content": "You are a helpful assistant."},
655
+
{"role": "user", "content": "Does Azure OpenAI support customer managed keys?"},
656
+
{"role": "assistant", "content": "Yes, customer managed keys are supported by Azure OpenAI."},
657
+
{"role": "user", "content": "Do other Azure AI services support this too?"}
658
+
]
659
+
)
660
+
661
+
print(response.choices[0].message.content)
662
+
```
663
+
664
+
---
665
+
530
666
## Delete deployment
531
667
532
668
Unlike other types of Azure OpenAI models, fine-tuned/customized models have [an hourly hosting cost](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/#pricing) associated with them once they are deployed. It is **strongly recommended** that once you're done with this tutorial and have tested a few chat completion calls against your fine-tuned model, that you **delete the model deployment**.
0 commit comments