Skip to content

Search Tool

Shows how to use Exa as an AIFunction tool with any IChatClient.

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

1
2
3
4
using var client = new ExaClient(apiKey);

// Create a search tool from the Exa client for use with any IChatClient.
var tool = client.AsSearchTool(numResults: 3);