Hello Zhai, Jim,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to set up automated notification to remind the OpenAI model's retirement dates 3 months in advance.
What I thought might be simplest in three steps, if you are familiar with a little python, Azure API and logic app. This is an example of how you can achieve this:
Step 1:
Use Azure’s API to get the metadata of your models by Extract Retirement Dates. For example, you can use the Azure SDK for Python:
from azure.ai.openai import OpenAIClient
from azure.identity import DefaultAzureCredential
client = OpenAIClient(credential=DefaultAzureCredential())
models = client.list_models()
retirement_dates = {}
for model in models:
retirement_dates[model.name] = model.metadata.get('retirement_date')
Step 2:
Store the extracted dates in a database or a configuration file. For simplicity, let’s assume you’re storing them in a dictionary.
Step 3:
Use Azure Logic Apps to create a workflow that checks the retirement dates and sends email notifications:
- Create a Logic App: Go to the Azure portal and create a new Logic App.
- Add a Recurrence Trigger: Set up a trigger to run the workflow daily.
- Add an HTTP Action: Use an HTTP action to call your API or function that checks the retirement dates.
- Add a Condition: Check if any model’s retirement date is within the next three months.
- Send Email: If the condition is met, use the “Send an email” action to notify the relevant people.
- Your Logic App Workflow will be similar such as:
- Recurrence Trigger: Runs daily.
- HTTP Action: Calls an API to get the retirement dates.
- Condition: Checks if any retirement date is within the next three months.
- Send Email: Sends an email notification if the condition is met.
There are many other methods, but with the above steps, you can automate the monitoring and notification process for your model retirement dates.
I hope this is helpful! Do not hesitate to let me know if you more detail along the way.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.