-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to retrieve answers for Financial Planning Skill #1
Comments
Hi! Thanks for your interest in the workshop. Unfortunately we don't give out the solutions because that would not be in the spirit of the goal (which is for people to learn developing skills) of the workshop. However if you have some code for the financial planning skill on Github somewhere I can review it for you and give you some hints for parts in which you are stuck. Or if you have a specific question about the implementation I could answer it here and update the README if more people are stuck at a certain requirement of the financial planning skill. |
Okay, thanks for the answer. I was stuck on retrieving a specific session variable. I believe that was missing from the readme as well. |
Ok, I'll try and update the readme to better explain how session variables should be handled, thanks for the feedback! But here are some code samples: Example of storing user answers in the session: case "SetGoalPeriod":
var goalPeriod = ((IntentRequest)input.Request).Intent.Slots[FinancialPlanningSkill.GOAL_PERIOD_KEY];
input.Session.Attributes.Add(FinancialPlanningSkill.GOAL_PERIOD_KEY, double.Parse(goalPeriod.Value)); Example of retrieving user answers from the session: input.Session.Attributes[FinancialPlanningSkill.GOAL_PERIOD_KEY] Depending on how your code is setup you have to determine which questions still need to be asked (by looking if the variable is already in the session): if (!session.Attributes.ContainsKey(FinancialPlanningSkill.GOAL_PERIOD_KEY))
{
return FinancialPlanningSkill.AMOUNT_OF_MONTHS_QUESTION;
} And you need to check if all questions have been answered (if so you can run the feasability calculator): session.Attributes.ContainsKey(FinancialPlanningSkill.GOAL_AMOUNT_KEY)
&& session.Attributes.ContainsKey(FinancialPlanningSkill.INITIAL_SAVINGS_KEY)
&& session.Attributes.ContainsKey(FinancialPlanningSkill.MONTHLY_CONTRIBUTION_KEY)
&& session.Attributes.ContainsKey(FinancialPlanningSkill.GOAL_PERIOD_KEY); I hope this helps, and thanks for the input. |
Thanks! Hopefully I'll get around to do this soon or otherwise in the holidays. It's super exciting to work with cutting edge technology like programming these skills. Don't want to do stuff that's already been done before by the masses :P |
Looking forward to your solutions / insights! 👍 Yes, that's the reasons we are investing in conversational interfaces at Tech Labs, nobody knows yet how to successfully create a skill that can replace an entire conversation with a human expert which makes it a lot more exciting to work on. If you need any help later on just let me know, good luck! |
What do you think about a personalized news cast. Alexa asks the user for some specific interests and then provides a daily news bulletin. It should have the ability to zoom in on specific news segments when the user asks for it. E.g.: news on demand |
Sorry for the late reply, if there are some free news API's available it should be possible. I guess storing the user preference might be tricky though, you'd need to store that on your own servers, the skill itself is stateless. In any case, looking forward to your Alexa skills! |
Hey! I just followed the workshop you hosted. Is it possible for you to send me the solution for the Financial Planning Skill? Thanks!
PS. It was very interesting.
The text was updated successfully, but these errors were encountered: