Liquid
LiquidProvider in the Vercel.AI.Liquid namespace creates the Liquid models that this port implements. The API reference lists every option: LiquidProvider.
Browse the upstream catalog of Liquid models and their pricing on the Vercel AI Gateway models page.
Models
Section titled “Models”| Kind | Factory method | Model ids in this port’s tests and docs |
|---|---|---|
| Decision | DecisionModel |
d1.2, d1.2-ultra |
A model id in the table is one that the tests or docs use. It is not the complete list of ids the provider accepts. Pass any id that the provider documents. An id that links to the Vercel AI Gateway catalog has a Gateway slug listed there.
Example
Section titled “Example”Decision model:
var model = LiquidProvider.Create().DecisionModel("d1.2");var result = await Decide.DecideAsync( new DecideRequest { Model = model, State = "I was charged twice for my subscription. Please refund the duplicate.", Questions = new Dictionary<string, DecisionQuestion> { ["category"] = new( "choice", "Which team should handle this request?", new DecisionChoiceCriteria( new Dictionary<string, DecisionInput?> { ["billing"] = "Charges, invoices, and refunds", ["technical"] = "Bugs and outages", } ) ), }, });
foreach (var answer in result.Answers){ Console.WriteLine($"{answer.Key}: {answer.Value.Choice}");}See the Providers guide for authentication and provider options.
Model capabilities
Section titled “Model capabilities”Use LiquidModelCapabilitiesLookup.Get(modelId) from Vercel.AI.Liquid to look up a model’s declared capabilities and provider options, grouped by endpoint. It makes no API request and needs no configuration. It returns null for a model id the catalog does not list.
using Vercel.AI.Liquid;
var model = LiquidModelCapabilitiesLookup.Get("d1.2");foreach (var (endpoint, metadata) in model?.Endpoints ?? []){ Console.WriteLine($"{endpoint}: {metadata.Operation}");}Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product