Following is working for me
https://{{YourEndPoint}}.openai.azure.com/openai/threads?api-version=2024-05-01-preview
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
From the documentation, I have seen that we can retrieve the thread information given the thread_id.
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}?api-version=2024-02-15-preview
But if we don't know the thread_id, how to list all the threads under this resource.
In OpenAI, I can see some solution to GET https://api.openai.com/v1/threads/
Any way to do that through Azure OpenAI API?
Following is working for me
https://{{YourEndPoint}}.openai.azure.com/openai/threads?api-version=2024-05-01-preview
This works for me:
import requests
endpoint = f"{AZURE_ENDPOINT}/openai/threads"
# Define the headers
headers = {
'api-key': AZURE_API_KEY,
'Content-Type': 'application/json',
}
# Define the parameters
params = {
'api-version': '2024-08-01-preview',
}
# Make the GET request
response = requests.get(endpoint, headers=headers, params=params)