Example showing how to create MEAI AIFunction tools for use with any IChatClient.
This example assumes using CVAT; is in scope and apiKey contains your CVAT API key.
1 2 3 4 5 6 7 8 91011121314151617181920
// Create CVAT AIFunction tools for use with any IChatClient.// These tools allow AI agents to interact with CVAT for// computer vision annotation workflows.usingvarclient=newCVATClient(apiKey);// Create tools for common CVAT operations:varlistProjectsTool=client.AsListProjectsTool();vargetTaskTool=client.AsGetTaskTool();varlistLabelsTool=client.AsListLabelsTool();vargetJobStatusTool=client.AsGetJobStatusTool();// Verify all tools are created successfully:// These tools can be passed to any IChatClient implementation:// var response = await chatClient.GetResponseAsync(// "List all annotation projects",// new ChatOptions// {// Tools = [listProjectsTool, getTaskTool, listLabelsTool, getJobStatusTool],// });