Are you ready to add cloud based machine learning APIs to your Sitecore solution? Then save yourself some time and use Sitecore Cognitive Services.
What is it, you ask? It's a series of .NET API connectors (the core) and new features built on that core. It's open source and available on GitHub or Nuget. You can use what's there, improve on them or even build your own using the existing ones a model.
This differs from previous versions of this project by the separation of the core from the features. Earlier I had one large solution with everything in it but now that I have a growing number of features, it's becoming more important to segment the projects and provide them separately.
Here's a few videos to get you started:
There's a lot of problems we as developers have long since given up on solving because at the time there was no solution. With the advent of turnkey machine learning cloud APIs it's time to rethink what's possible. Image analysis, language parsing and analytic analysis are now just a few of the new things we can automate at scale.
The list of systems supported at this point are:
There's a few ways you can install this:
As of this writing only two of the projects are on Nuget. The other two projects are more of a guide than a finished project but you can get them here:
If you've decide to go this route, you'll need to manually configure the unicorn serialization path to make sure that the serialized files that were installed are synced in properly.
When you go to download and setup the system, you want to know they live in nested folders. The core is the main solution and each of the feature projects should be checked out into their own subfolder under /src/Feature (ie: /SitecoreCognitiveServices/src/Feature/OleChat). Each feature has it's own publish profile and can be published onto your working Sitecore website independently.
Here's the list of parts (as of this writing)
The source code setup steps are as follows:
Most of what how you'll interface with the system is the Core API service classes and making them available to you so you can start building interesting new features but there's a little setup that you need to start with.
One of the most important parts of the system is creating and saving your API keys so that you can use the API connectors. I'm not going to go into detail on how to setup an account for each API but once you do, log into Sitecore and drill down to /sitecore/system/modules/Sitecore Cognitive Services/APIs and select the provider you're using. There is a group of fields that may already have some default values but make sure they all match the environment that you're using. Paste in the value, save and publish and you're done.
If you want to be able to use a service, you must first make sure you've saved the keys into the API section of the content tree. Once that's in place you ready to use the 'Service' classes. The namespaces start with: 'SitecoreCognitiveServices.Foundation.SCSDK.Services'. You can either instantiate them manually or inject them using dependency injection (the easier approach).
There are a lot more utility classes that I've built into the SCSDK project that you can use to get items or publish. If you're starting new, you can use the existing features to see what's available.
For this article I'm limiting the scope to just setting up the project and working with the Core. I'll be writing separate articles later one each feature individually.
If you like to build new things then destiny is calling you. There isn't a more potent opportunity to stretch your fingers into and really rethink a lot about how we work with our technology. Eventually we'll deplete this vast new resource but until then there is a lot to learn and discover. Carpe all the diems!