Skip to content

AIFunction Tools

Shows how to use HammingAI as MEAI AIFunction tools with any IChatClient.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
using var client = new HammingAIClient(apiKey);

// Create AIFunction tools for use with any IChatClient.
var runTestTool = client.AsRunVoiceAgentTestTool();
var getStatusTool = client.AsGetVoiceExperimentStatusTool();
var getCallsTool = client.AsGetVoiceExperimentCallsTool();
var listDatasetsTool = client.AsListDatasetsTool();

// Pass these tools to any IChatClient via ChatOptions.Tools.
Console.WriteLine($"Available tools: {runTestTool.Name}, {getStatusTool.Name}, {getCallsTool.Name}, {listDatasetsTool.Name}");