Hello @Russell Myers,
I understand that you're looking to retrieve specific stored threads from the Azure AI Agent Service to resurrect previous chat conversations. Here's how you can do that:
Each conversation is identified by a unique ChatThreadId
. You can find this ID by using the Azure Resources extension in Visual Studio Code under the "Threads" section, which displays a list of all threads along with their IDs.
The API provided by the Azure AI Agent Service allows you to interact with the stored threads. You can typically use commands like Get Thread
or List Threads
to retrieve information about the threads stored in the service.
Once you have the ChatThreadId,
You can retrieve messages linked to a specific thread using the REST API. Below is an example of a curl
command to perform this action:
curl $AZURE_AI_AGENTS_ENDPOINT/threads/{thread_id}/messages?api-version=2024-12-01-preview\ -H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
The API provided by the Azure AI Agent Service allows you to interact with the stored threads. You can typically use commands like Get Thread
or List Threads
to retrieve information about the threads stored in the service.
When using the API to retrieve a specific thread, make sure to provide the required parameters such as the ChatThreadId
to accurately identify the thread you want to access.
If you want to resurrect the conversation or perform further actions, you can run the thread using its ID. Here’s how you can do that:
curl $AZURE_AI_AGENTS_ENDPOINT/threads/{thread_id}/runs?api-version=2024-12-01-preview \
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
-d '{
"assistant_id": "your_assistant_id"
}'
After triggering a run, check the run status and fetch responses using the appropriate endpoint. This allows you to continue or revisit the agent's interaction history.
I hope this helps. Do let me know if you have further queries.
Thank you!