You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added AI integration example featuring Retrieval-Augmented Generation (RAG) along with updates to related documentation, routes, and dependency patches. The new code is in a new ai.js controller, and not in api.js, because most AI integrations are more than just an API call. Other AI related examples that are in api.js controller will be moved to ai.js in the near future.
- Added new views for RAG examples (rag.pug and index.pug) and configured corresponding routes in app.js.
- Removed legacy navbar code and added an "AI Examples" link in the header.
- Updated package dependencies and added patches for LangChain, LangChain MongoDB, and Hugging Face integrations.
Copy file name to clipboardExpand all lines: README.md
+53-28Lines changed: 53 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -83,9 +83,13 @@ I also tried to make it as **generic** and **reusable** as possible to cover mos
83
83
- Contact Form (powered by SMTP via Sendgrid, Mailgun, AWS SES, etc.)
84
84
- File upload
85
85
- Device camera
86
+
-**AI Examples and Boilerplates**
87
+
- RAG with semantic and embedding caching
88
+
- Llama Instruct, Llama Vision
89
+
- OpenAI Moderation
90
+
- Support for a range of foundational and embedding models (DeepSeek, Llama, Mistral, Sentence Transformers, etc.) via LangChain, Together.AI, and Hugging Face
86
91
-**API Examples**
87
92
88
-
-**AI:** OpenAI Moderation, LLAMA instruct, LLAMA vision (via Together AI serverless foundational models - Deepseek, Llama, Mistral, etc.)
-**Data, Media & Entertainment:** Alpha Vantage (stocks and finance info) with ChartJS, Github, Foursquare, Last.fm, New York Times, Trakt.tv (movies/TV), Twitch, Tumblr (OAuth 1.0a example), Web Scraping
91
95
-**Maps and Location:** Google Maps, HERE Maps
@@ -292,6 +296,14 @@ Obtain SMTP credentials from a provider for transactional emails. Set the SMTP_U
- Go to <ahref="https://huggingface.co"target="_blank">https://huggingface.co</a> and create an account.
302
+
- Go to your Account Settings and create a new Access Token. Make sure you have granted the **"Make calls to Inference Provider"** permission to your token.
303
+
- Add your token as `HUGGINGFACE_KEY` to your `.env` file or as an environment variable.
- Go to <ahref="https://developer.intuit.com/app/developer/qbo/docs/get-started"target="_blank">https://developer.intuit.com/app/developer/qbo/docs/get-started</a>
@@ -328,6 +340,17 @@ Obtain SMTP credentials from a provider for transactional emails. Set the SMTP_U
The OpenAI moderation API for checking harmful inputs is free to use as long as you have paid credits in your OpenAI developer account. The cost of using their other models depends on the model, as well as the input and output size of the API call.
346
+
347
+
- Visit <ahref="https://platform.openai.com/api-keys"target="_blank">OpenAI API Keys</a>
348
+
- Sign in or create an OpenAI account.
349
+
- Click on **Create new secret key** to generate an API key.
350
+
- Copy and paste the generated API key into your `.env` file as `OPENAI_API_KEY` or set it as an environment variable.
- Click on **Create API Key** to generate a new key. You will also be able to access your API key under your account settings in the API Keys tab.
400
+
- Copy and paste the generated API key into your `.env` file as `TOGETHERAI_API_KEY` or set it as an environment variable.
401
+
- Go to Together AI's <ahref="https://api.together.ai/models"target="_blank"> Models</a> page and pick a model based on your use case and budget and specify it as `TOGETHERAI_MODEL` in your `.env` file or as an environment variable (e.g. `togethercomputer/llama-3-70b-chat`).
The OpenAI moderation API for checking harmful inputs is free to use as long as you have paid credits in your OpenAI developer account. The cost of using their other models depends on the model, as well as the input and output size of the API call.
421
-
422
-
- Visit <ahref="https://platform.openai.com/api-keys"target="_blank">OpenAI API Keys</a>
423
-
- Sign in or create an OpenAI account.
424
-
- Click on **Create new secret key** to generate an API key.
425
-
- Copy and paste the generated API key into your `.env` file as `OPENAI_API_KEY` or set it as an environment variable.
- Click on **Create API Key** to generate a new key. You will also be able to access your API key under your account settings in the API Keys tab.
434
-
- Copy and paste the generated API key into your `.env` file as `TOGETHERAI_API_KEY` or set it as an environment variable.
435
-
- Go to Together AI's <ahref="https://api.together.ai/models"target="_blank"> Models</a> page and pick a model based on your usecase and budget and specify it the `TOGETHERAI_MODEL` in your `.env` file or as an environment variable (e.g. `togethercomputer/llama-3-70b-chat`).
You need to have a MongoDB server running before launching `app.js`. You can download MongoDB [here](https://www.mongodb.com/try/download/community), or install it via a package manager.
705
728
Windows users, read [Install MongoDB on Windows](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-windows//).
706
729
707
-
**Tip:** If you are always connected to the internet, you could just use [MongoDB Atlas](https://www.mongodb.com) instead of downloading and installing MongoDB locally. You will only need to update database credentials in `.env` file.
730
+
**Tip:** If you are always connected to the internet, you could just use [MongoDB Atlas](https://www.mongodb.com) instead of downloading and installing MongoDB locally. You will only need to update the database credentials in the `.env` file.
731
+
732
+
**NOTE:** MongoDB Atlas (cloud database) is required for vector store, index, and search features used in AI integrations. These features are NOT available in locally installed MongoDBs.
708
733
709
734
### I get an error when I deploy my app, why?
710
735
@@ -1373,9 +1398,9 @@ Using a local instance on your laptop with ngrok is a good solution for your dem
1373
1398
- Fill in your information then hit **Create your Atlas account**
1374
1399
- You will be redirected to Create New Cluster page.
1375
1400
- Select a **Cloud Provider and Region**
1376
-
- Select cluster Tier to Free forever **Shared** Cluster
1401
+
- Set the cluster Tier to Free Forever **Shared** Cluster
1377
1402
- Give Cluster a name (default: Cluster0)
1378
-
- Click on green **:zap:Create Cluster button**
1403
+
- Click on the green **:zap:Create Cluster button**
1379
1404
- Now, to access your database you need to create a DB user. To create a new MongoDB user, from the **Clusters view**, select the **Security tab**
1380
1405
- Under the **MongoDB Users** tab, click on **+Add New User**
1381
1406
- Fill in a username and password and give it either **Atlas Admin** User Privilege
0 commit comments