tomseldon / tiny-rebel-api Goto Github PK
View Code? Open in Web Editor NEWA set of web services for ealing with Tiny Rebel drinks
A set of web services for ealing with Tiny Rebel drinks
Use speech synthesis markup (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference) to improve the realism of the speech output.
e.g.
Need to try this against actual voice output instead of just testing the text response.
Currently a bar location has to be entered for each session. This would be better to change and store the user's choice so we do not have to ask them (or require they provide it) each time.
This involves:
> Alexa, ask Tiny Rebel to suggest a drink
[check if user has provided bar location before]
[=no]
>> Should I check Cardiff or Newport?
> Cardiff
[store bar location as Cardiff]
>> You might like.... (etc.)
> Alexa, ask Tiny Rebel to suggest a drink
[check if user has provided bar location before]
[=yes]
>> You might like.... (etc.)
> Alexa, ask Tiny Rebel to suggest a drink in Newport
[check if user has provided bar location before]
[=yes (Cardiff)]
>> You might like.... (etc.)
etc.
Alexa SDK supports state flows and per-user attributes as would be required to implement this. See SDK docs.
Originally hacked together in JS to get something working and deployed.
Convert to TS and add build step prior to deployment.
Currently using default memory allocation of 1GB. It seems requests are using about 25MB per request, so can potentially drop this by a lot.
Needs investigation.
For testing functions locally (or in CI), need to provide mock data (in the form of JSON files).
Create a JSON file for the following:
Once done, could potentially run serverless invoke local
during CI to verify they don't error.
Currently no Access-Control-Allow-Origin
header is present. This stops the API being called from a webpage.
"Access-Control-Allow-Origin": "*"
As this repo contains two services, i.e. JSON API and Alexa skill, calling it "tiny-rebel-api" no longer makes sense. "tiny-rebel-web-services" would be a better name.
Add support for getting a drink suggestion based on an upper limit, e.g.
Alexa, ask Tiny Rebel to suggest a beer that costs less than £4
This would involve:
drink.price >= slot.upperPriceLimit
Add support to suggest a drink based on type, e.g.
Alexa, ask Tiny Rebel to suggest an IPA
Alexa, ask Tiny Rebel to suggest a pale ale
Alexa, ask Tiny Rebel to suggest a cider
This involves:
DrinkType
slotdrinks.dinkType === drinkTypeSlot
as certain types overlap (e.g "IPA" should match "Pale Ale"). Need to think of best way of matching these.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.