.Net SDK for development of Yandex Alice skills using C# language.
It supports the following skill types:
Install NuGet package with SDK:
Install-Package Yandex.Alice.Sdk
This repository has a demo project written on ASP.NET Core Web Api, which demonstrates the usage of SDK.
Demo project skill was published in the Alice catalog:
In general, you would need to create a controller with the POST action method which receives an object of AliceRequest class as a parameter.
The method can return one of three response types according to Alice's protocol:
- AliceResponse - without images
- AliceImageResponse - with one image
- AliceGalleryResponse - with a gallery of several images
A simple example of the implementation of functionality is described above:
using Microsoft.AspNetCore.Mvc;
using Yandex.Alice.Sdk.Models;
[ApiController]
[Route("[controller]")]
public class AliceController : ControllerBase
{
[HttpPost]
[Route("/alice")]
public IActionResult Get(AliceRequest aliceRequest)
{
return Ok(new AliceResponse(aliceRequest, "Hello"));
}
}
More info you can find in the wiki
For Smart home skills in addition to the server that receives requests from Alice, you would need an additional OAuth server. In this smart home demo project, both servers were combined in one for simplicity. This wiki page has a guide that you can use to quickly create a skill and test library.
Please check out the Contributing guide for guidelines about how to start.