Node.js backend for an AWS Lambda function used by the "Generative AI" Alexa Skill. The function utilizes OpenAI's Generative Artificial Intelligence API to generate responses in a natural conversation with the device.
The goal is to create an interactive and intelligent experience, allowing users to receive dynamic responses to a variety of questions and commands.
Using the simple diagram above that illustrates the architecture
- Alexa Skill: Skill that receives voice commands from users.
- AWS Lambda: Lambda function that processes the received commands and interacts with the OpenAI API.
- OpenAI API: API that generates responses using generative AI based on the sent conversation.
- AWS account with access to AWS Lambda and Alexa Skills Kit.
- OpenAI account with access to the OpenAI API.
- Create a new Alexa skill using the Alexa Skills Kit (ASK). Define the intentions and interaction models as needed.
- Implement the skill logic that will process user inputs and interact with the Lambda function.
- Upload the code from this repository to your Lambda function.
- Set up Lambda trigger as Alexa/IoT and link your Skill ID.
- Copy the Lambda function's ARN and set it as the endpoint for your Alexa Skill.
- Obtain an API key from OpenAI.
- Configure the OpenAI API credentials in the Lambda function code.
- Test the skill using the Alexa test console or an actual Alexa device.
- Developer Mode: This skill is only available in Developer mode, meaning it is not visible or accessible in the Skills Store and is only available for testing.
- Amazon Account: If you intend to test with a physical Alexa device (e.g., Amazon Echo, Echo Dot, Echo Show), the email of the Amazon account must be the same as that of the Alexa Skills Kit.
- Conversation History: The current version does not support conversation history.