Skip to content

MEAI Tools

Use AIFunction tools with Microsoft.Extensions.AI for integration with any IChatClient.

This example assumes using HumeAI; is in scope and apiKey contains your HumeAI API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// Create an authenticated client
using var client = new HumeAIClient(apiKey);

// Create AIFunction tools for use with any IChatClient
var startJobTool = client.AsStartBatchJobTool();
var getStatusTool = client.AsGetJobStatusTool();
var listJobsTool = client.AsListJobsTool();
var synthesizeTool = client.AsSynthesizeSpeechTool();
var listVoicesTool = client.AsListVoicesTool();
var listChatsTool = client.AsListChatsTool();

// Verify tools are created with proper metadata