powered by
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Welcome to the AI Hackathon Starter Kit! This project has been created to make AI accessible and easy for everyone. Whether you are a beginner with no prior experience or an experienced developer, this starter kit is designed to help you incorporate AI into your apps quickly and easily.
The AI Hackathon Starter Kit has many features that make it an excellent tool for anyone looking to work with AI.
The tool showcases how to work with the following use cases:
- Transcription (Speech to Text)
- Text Analytics
- Sentiment Analysis
- Entity Recognition
- Special Entity Recognition for Healthcare
- Pii Recognition
- Speak (Text to Speech)
- Natural Language Generation
This kit removes the complexity of working with AI and allows you to focus on building your app. We have added placeholders for you to add your code and get started quickly. Search for the text "NOTE TO DEVELOPER: YOUR_MAGIC_GOES_HERE
" to find the placeholders.
var timeoutId = setTimeout(() => {
/**
* ***************************************
* NOTE TO DEVELOPER: YOUR_MAGIC_GOES_HERE
* ***************************************
* This is where you would do interesting things
* with the words that were spoken.
*/
setWordsSpoken((prev:string) => {
return prev + " " + event.privText;
});
}, wordOffset);
These usecases leverage the following technologies:
- Azure Cognitive Services for:
- Speech Learn More
- Language Learn More
- Azure Open AI Learn More
Major cloud technologies/frameworks/libraries are listed here:
To get a local copy up and running follow these simple example steps.
To use this starter kit, you will need the following cloud services:
- Create a free Azure account here.
- Create a free OpenAI account here.
- Sign up for the Azure Cognitive Services Speech API here.
- Sign up for the Azure Cognitive Services Language API here.
- Sign up for the Azure Cognitive Services OpenAI API here.
To learn more about setting up your cloud resources, please visit see cloud-setup.
- Node.js: Check if you have Node.js installed by running the following command in your terminal:
node -v
Please validate that the version is 18.15 or higher.
- Npm: Check if you have npm installed by running the following command in your terminal:
npm -v
Please validate that the version is 9.6 or higher.
- Git
- Visual Studio Code
A sample environment file has been provided for you to use. You will need to update the values in the file with your own values.
-
Open up a text editor and get a copy of the evnironment file from: github.com/rohit-lakhanpal/ai-hackathon-starter-kit/blob/main/src/api/.env-sample
-
Update the values in the
.env
file with your own values.PORT=8730 APP_NAME="YOUR_APP_NAME" APP_DESCRIPTION="YOUR_APP_DESCRIPTION" APP_REPOSITORY_OPTIONAL="YOUR_APP_REPOSITORY_URL (Optional. If you remove this line, it defaults to this repository's url.)" APP_LOGO_OPTIONAL="YOUR_APP_LOGO_URL (Optional. If you can remove this line, it defaults to the Microsoft logo.)" APP_FAVICON_OPTIONAL="YOUR_APP_FAVICON_URL (Optional. You can remove this line, it defaults to the Microsoft favicon.)" LANGUAGE_KEY="YOUR_AZURE_LANGUAGE_KEY" LANGUAGE_REGION="[e.g. eastus]" LANGUAGE_ENDPOINT_URL="[e.g. https://your-deployment-name.cognitiveservices.azure.com/]" SPEECH_KEY="YOUR_AZURE_SPEECH_KEY" SPEECH_REGION="YOUR_AZURE_SPEECH_REGION" SPEECH_ENDPOINT_URL_OPTIONAL="YOUR_AZURE_SPEECH_ENDPOINT_URL (Optional. You can remove this line if you don't have a custom speech endpoint url.)" OPENAI_TYPE="Must be either openai or azure" OPENAI_KEY="YOUR_OPENAI_KEY" OPENAI_AZURE_KEY="YOUR_OPENAI_AZURE_KEY" OPENAI_AZURE_BASE_URL="[e.g. https://[your-deployment-name].openai.azure.com/]" OPENAI_AZURE_API_VERSION_OPTIONAL="2023-03-15-preview" OPENAI_AZURE_MODELS_TEXT="YOUR_MODEL_DEPLOYMENT_NAME_FOR_text-davinci-003" OPENAI_AZURE_MODELS_CHAT="YOUR_MODEL_DEPLOYMENT_NAME_FOR_gpt-35-turbo_or_GPT-4"
-
Clone the repo
git clone https://github.com/rohit-lakhanpal/ai-hackathon-starter-kit.git
-
Navigate to the src folder
cd ai-hackathon-starter-kit/src
Here you will notice two folders:
- api: This is the backend api that will be used to call cloud services.
- ui: This is the frontend web application that will be used to interact with the user.
Let's start with the api first.
- Navigate to the api project folder
cd ai-hackathon-starter-kit/src/api
- Create a .env file and update the values with your own values from the step above.
cp .env-sample .env
- Install NPM packages
npm install
- Run the api
npm start
Your APIs should now be running on at localhost:8730
. Test the api by navigating to http://localhost:8730/api/status. You should see the following response:
{
"status":"200OK"
}
- Navigate to the web project folder and npm install
cd ai-hackathon-starter-kit/src/ui
- Create a .env file using the
.env-sample
as a base. In the UI project, the only value you need to update is the PORT value (in case you want to run it on a port other than 8700).cp .env-sample .env
- Install NPM packages
npm install
- Start the web application
npm start
Your web application should now be running on at localhost:8700
. Test the web application by navigating to http://localhost:8700.
Note: If you changed the port in the
.env
file, please use that port instead of 8700.
You should see the following response:
Whether you are building a chatbot, voice assistant, or any other type of AI-powered application, this starter kit provides you with all the tools you need to get started. So why wait? Download the AI Hackathon Starter Kit today and start building amazing AI-powered applications!
For more examples, please refer to the Documentation
- Add Support for Chat Completion
- Add Form Recognizer Use Cases
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project: Fork the repo you want to contribute to by clicking the Fork button on the top right corner of the repo page.
- Clone the Repo: Clone the forked repo to your local machine using the command (
git clone URL_OF_FORK
). - Branch: Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit: Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch: (
git push origin feature/AmazingFeature
) - Open a Pull Request: Go to your forked repo on GitHub and click Contribute and then Open a pull request. Fill out the details of your pull request and submit it.
Learn more about contributing to projects here.
This template is provided "as is" without warranty of any kind, whether express or implied. Use at your own risk! The author will not be liable for any losses or damages associated with the use of this template.
It is intended to be used as a starting point for your own project and not as a final product.
Distributed under the MIT License. See LICENSE.txt
for more information.
Rohit Lakhanpal - @about_me - [email protected]
Project Link: https://github.com/rohit-lakhanpal/ai-hackathon-starter-kit
- Based on amazing work done by amulchapla
- Prompt engineering samples from DSR
- This amazing ReadME template
- Learn more about GPT, Azure OpenAI Service and Prompt Engineering (youtube)
- Prompt engineering techniques
- Apply for the Azure OpenAI Service
- Models
- Quotas and limits
- Data privacy with Azure OpenAI
Special thanks to Github Copilot for helping me code this sample. Much love!
Generated by AI, edited by humans.