Skip to content

MEAI Tools

Example showing how to use Oura Ring data as AIFunction tools with any IChatClient.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
// Create an Oura client with your API key.
using var client = new OuraClient(apiKey);

// Get all tools using the aggregate method.
var tools = client.AsTools();

// These tools can be passed to any IChatClient for function calling:
// var chatResponse = await chatClient.GetResponseAsync(
//     "How did I sleep last night?",
//     new() { Tools = [getDailySleepTool, getSleepDataTool] });