Skip to content

Releases: dialogflow/dialogflow-dotnet-client

Added messages field to fulfillment

17 Nov 05:20
Compare
Choose a tag to compare

Improvements for contexts

14 Oct 10:37
Compare
Choose a tag to compare

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.

Windows 10 and Windows Phone 8

02 Oct 08:22
Compare
Choose a tag to compare

This release adds Windows 10 Universal Apps support. Also, Windows Phone 8 version moved from separate Nuget library to common Nuget library.

Fixed bug with parameters processing

23 Sep 05:56
Compare
Choose a tag to compare

This release contains breaking change in model Result class.

public Dictionary<string, string> Parameters { get; set; }

replaced with

public Dictionary<string, object> Parameters { get; set; }

So, Parameters dictionary now can contain structured Json objects.
You can get it with

public JObject GetJsonParameter(string name, JObject defaultValue = null)

See this code for sample

User entities and contexts

29 May 09:16
Compare
Choose a tag to compare

User Entities and Contexts can be added to the request with such code:

var myDwarfs = new Entity("dwarfs");
myDwarfs.AddEntry(new EntityEntry("Ori", new [] {"ori", "Nori"}));
myDwarfs.AddEntry(new EntityEntry("bifur", new [] {"Bofur","Bombur"}));
var extraEntities = new List<Entity> { myDwarfs };

var extraContexts = new List<AIContext> { new AIContext { Name = "someContext" } };

apiAi.TextRequest("hello", requestExtras);

WP8 and new protocol

20 Apr 11:19
Compare
Choose a tag to compare

Now you can use base API.AI Library in your Windows Phone 8 project. The API is quite similar to the generic .NET SDK, but uses async methods

async Task<AIResponse> TextRequestAsync(string text)
async Task<AIResponse> TextRequestAsync(AIRequest request)
async Task<AIResponse> VoiceRequestAsync(Stream voiceStream)

Also, please note the protocol change.
Now Fulfillment field from API.AI console becomes composite field in the protocol. Earlier it was simple string field named "speech".
So, "speech" field now in the Fulfillment object. And you should change

response.Result.Speech

to

response.Result.Fulfillment.Speech

New release already in Nuget

Changed parser

13 Apr 11:52
Compare
Choose a tag to compare

In this release changed Json parser from fastJSON to Json.NET.
Also added some useful methods to the model classes for working with action parameters. Take a look:

response.Result.GetStringParameter("parameter_name", "optional_default_value");

response.Result.GetIntParameter("number")
response.Result.GetIntParameter("number", 17)

response.Result.GetFloatParameter("number")
response.Result.GetFloatParameter("number", 17f)

First library release

24 Feb 10:39
Compare
Choose a tag to compare

The API.AI .NET Core Library makes it easy to integrate the API.AI natural language processing API into your .NET application. Library provides simple programming interface for making text and voice requests to the API.AI service. See details on the api.ai website.