Example showing how to use Zep as AIFunction tools with any IChatClient.
This example assumes using Zep; is in scope and apiKey contains your Zep API key.
1 2 3 4 5 6 7 8 91011121314151617181920
// Create a Zep client with your API key.usingvarclient=newZepClient(apiKey);// Create AIFunction tools for use with any IChatClient.varaddMemoryTool=client.AsAddMemoryTool();varsearchMemoryTool=client.AsSearchMemoryTool();vargetContextTool=client.AsGetContextTool();varlistThreadsTool=client.AsListThreadsTool();vargetUserNodeTool=client.AsGetUserNodeTool();varaddMessagesTool=client.AsAddMessagesTool();// These tools can be passed to any IChatClient for function calling:// var chatResponse = await chatClient.GetResponseAsync(// "What do you remember about Alice?",// new() { Tools = [searchMemoryTool, getContextTool] });