A sample movies app built with ❍ Ion to demo how to use AI in your apps using your data — movies.sst.dev
The movie database in this app contains around 700 popular movies. You can search through them, check out related movies, and some of the movies are also tagged.
Most of the AI demos to date include some form of chat. While this is useful, it doesn't apply to majority of the apps out there. It also involves storing your data outside your infrastructure.
This demo shows how you can use AI related features in your infrastructure in a way that makes sense to your users.
The following AI features are powered by our new Vector component.
The Vector component is based on Amazon Bedrock and it exposes a couple of functions that makes it easy to use AI with your data.
ingest
: This takes some text, generates an embedding with a given model, and stores it in a Vector database powered by RDS. Also takes some metadata to tag the data.retrieve
: Takes a prompt and optionally the metadata to filter on. Returns matching results with a score 0 - 1.Currently the embeddings can be generated using the titan-embed-text-v1
, titan-embed-image-v1
, and text-embedding-ada-002
.
❍ Ion is an experimental new engine for SST that has some unique advantages over our previous CDK based engine. Here are a couple that you can see in action in this repo:
sst bind next build
This demo works by ingesting movie data from IMDB, generating embeddings, and storing it in a Vector database. The Next.js app then retrieves the data from the Vector database.
The sample app is made up of 4 simple components defined in the sst.config.ts
:
Join the SST community over on Discord and follow us on Twitter.