Skip to content

Improvements for contexts

Compare
Choose a tag to compare
@xVir xVir released this 14 Oct 10:37

From this release you can put some additional parameters to your input contexts and set lifespan for the context. Take a look:

var aiContext = new AIContext
{
    Name = "weather",
    Parameters = new Dictionary<string, string>
    {
        { "location", "London"}
    },
    Lifespan = 2
};

In the sample we create context with one parameter and set it Lifespan to 2.
Lifespan value determines for how many requests context will affect the result.