stoiveyp / alexa.net.statemanagement Goto Github PK
View Code? Open in Web Editor NEWSmall helper library for state management that works with Alexa.NET - based on the functionality exposed in the Java ASK SDK v2
License: MIT License
Small helper library for state management that works with Alexa.NET - based on the functionality exposed in the Java ASK SDK v2
License: MIT License
A more and more common scenario is to handle the storing and restoration of an intent, especially when context switching - it'd be great to have this handled by state management.
I believe the IPersistenceStore interface is incorrect and it does not currently match the java sdk. Currently the nodejs and java sdk's have methods for GetAttributes() and Save. I understand you took a slightly different approach of allowing to retrieve and item by key which is fine. If you leave it as is though, the SkillRequest object should be passed in to both the Get and Set methods. This is because the Alexa user id or Device id are used in the nodejs and java persistence interfaces as the key for the attributes record. I would make the change and submit a pull request, but the Alexa.NET.RequestHandlers Repository has a dependency on this Repository. Have you considered combining these into a single repository and have State Management be a part of the Request Handlers repository? You should still be able to generate separate Nuget packages if you needed to.
Not a useful package if no-one knows how to use it
Hello Steven,
Could you please give a simple example of how to use your StateManagement? I can't figure out how to use even reading unit tests. I have starting a skill's development based from your PetMatch sample but I need to add session attributes and I am stuck.
Thanks!
Regards,
jcb
It appears the session state of integer values are dropping during round trips between the Alexa device and the Lambda function. It appears to be working fine for string values.
Examples
skillState.SetSession("fruit", "apple");
skillState.SetSession("number", 100);
return ResponseBuilder.Tell(new SsmlOutputSpeech { Ssml = $"{speech}" }, skillState.Session);
var fruit = skillState.GetSession("fruit"); // fruit = "apple"
var number = skillState.GetSession("number"); // number = 0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.