This example assumes using Weave; is in scope and apiKey contains your Weave API key.
1 2 3 4 5 6 7 8 910111213141516171819
varapiKey=Environment.GetEnvironmentVariable("WANDB_API_KEY")is{Length:>0}value?value:thrownewAssertInconclusiveException("WANDB_API_KEY environment variable is not found.");usingvarclient=newWeaveClient(apiKey);// Create AIFunction tools for LLM observability.varlistCallsTool=client.AsListCallsTool();vargetCallTool=client.AsGetCallTool();varlistObjectsTool=client.AsListObjectsTool();varqueryTableTool=client.AsQueryTableTool();varaddFeedbackTool=client.AsAddFeedbackTool();vargetCallStatsTool=client.AsGetCallStatsTool();