Skip to content

MEAI Tools

Example showing how to use the Vellum client as MEAI AIFunction tools.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
// Create a Vellum client and wrap it as MEAI AIFunction tools.
using var client = new VellumClient(apiKey);

// Create tools for use with any IChatClient.
var executePromptTool = client.AsExecutePromptTool();
var searchDocumentsTool = client.AsSearchDocumentsTool();
var listDeploymentsTool = client.AsListDeploymentsTool();
var listDocumentIndexesTool = client.AsListDocumentIndexesTool();

// Verify the tools were created successfully.