varapiKey=Environment.GetEnvironmentVariable("NIXTLA_API_KEY")is{Length:>0}value?value:thrownewAssertInconclusiveException("NIXTLA_API_KEY environment variable is not found.");usingvarclient=newNixtlaClient(apiKey);// The client provides direct access to forecasting, anomaly detection,// cross-validation, and fine-tuning endpoints.
MeaiTools
1 2 3 4 5 6 7 8 91011121314
varapiKey=Environment.GetEnvironmentVariable("NIXTLA_API_KEY")is{Length:>0}value?value:thrownewAssertInconclusiveException("NIXTLA_API_KEY environment variable is not found.");usingvarclient=newNixtlaClient(apiKey);// Create tools for forecasting, anomaly detection, and model listing.varforecastTool=client.AsForecastTool();varanomalyDetectionTool=client.AsAnomalyDetectionTool();varlistModelsTool=client.AsListModelsTool();// These tools can be passed to any IChatClient that supports function calling.vartools=new[]{forecastTool,anomalyDetectionTool,listModelsTool};
Generate
Basic example showing how to create a client and make a request.