Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar fixes #27

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- 💻 [Contribute to this repo](#how-to-contribute-to-this-repo)

## Quickstart
The simplest way to try out this stack is to test it out locally and traverse through code files to understand how each component work. Here are the steps to get started.
The simplest way to try out this stack is to test it out locally and traverse through the code files to understand how each component works. Here are the steps to get started.

### 1. Fork and Clone repo

Expand Down Expand Up @@ -60,23 +60,23 @@ c. **Replicate API key**

Visit https://replicate.com/account/api-tokens to get your Replicate API key

> **_NOTE:_** By default, this template uses Pinecone as vector store, but you can turn on Supabase pgvector easily. This means you only need to fill out either Pinecone API key _or_ Supabase API key.
> **_NOTE:_** By default, this template uses Pinecone as a vector store, but you can turn on Supabase pgvector easily. This means you only need to fill out either a Pinecone API key _or_ a Supabase API key.

d. **Pinecone API key**
- Create a Pinecone index by visiting https://app.pinecone.io/ and click on "Create Index"
- Create a Pinecone index by visiting https://app.pinecone.io/ and clicking on "Create Index"
- Give it an index name (this will be the environment variable `PINECONE_INDEX`)
- Fill in Dimension as `1536`
- Once the index is successfully created, click on "API Keys" on the left side nav and create an API key: copy "Environment" value to `PINECONE_ENVIRONMENT` variable, and "Value" to `PINECONE_API_KEY`
- Once the index has been successfully created, click on "API Keys" on the left side nav and create an API key: copy the "Environment" value to the `PINECONE_ENVIRONMENT` variable, and "Value" to `PINECONE_API_KEY`

e. **Supabase API key**
- Create a Supabase instance [here](https://supabase.com/dashboard/projects); then go to Project Settings -> API
- `SUPABASE_URL` is the URL value under "Project URL"
- `SUPABASE_PRIVATE_KEY` is the key starts with `ey` under Project API Keys
- Now, you should enable pgvector on Supabase and create a schema. You can do this easily by clicking on "SQL editor" on the left hand side on supabase UI and then clicking on "+New Query". Copy paste [this code snippet](https://github.com/a16z-infra/ai-getting-started/blob/main/pgvector.sql) in the SQL editor and click "Run".
- Now you should enable pgvector on Supabase and create a schema. You can do this easily by clicking "SQL editor" on the left-hand side in the Supabase UI and then clicking "+New Query". Copy/paste [this code snippet](https://github.com/a16z-infra/ai-getting-started/blob/main/pgvector.sql) in the SQL editor and click "Run".

### 4. Generate embeddings

There are a few markdown files under `/blogs` directory as examples so you can do Q&A on them. To generate embeddings and store them in the vector database for future queries, you can run the following command:
There are a few markdown files under the `/blogs` directory as examples so you can do Q&A on them. To generate embeddings and store them in the vector database for future queries, you can run the following command:

#### If using Pinecone
Run the following command to generate embeddings and store them in Pinecone:
Expand All @@ -100,7 +100,7 @@ Now you are ready to test out the app locally! To do this, simply run `npm run d
#### Deploy to fly.io
- Register an account on fly.io and then [install flyctl](https://fly.io/docs/hands-on/install-flyctl/)
- Run `fly launch` under project root -- this will generate a `fly.toml` that includes all the configurations you will need
- Run `fly deploy -ha=false` to deploy the app -- the -ha flag makes sure fly only spins up one instance, which is included in the free plan. You also want to run `fly scale memory 512` to scale up the fly vm memory for this app.
- Run `fly deploy -ha=false` to deploy the app -- the -ha flag makes sure fly only spins up one instance, which is included in the free plan. You will also want to run `fly scale memory 512` to scale up the fly vm memory for this app.
- For any other non-localhost environment, the existing Clerk development instance should continue to work. You can upload the secrets to Fly by running `cat .env.local | fly secrets import`
- If you are ready to deploy to production, you should create a prod environment under the [current Clerk instance](https://dashboard.clerk.com/). For more details on deploying a production app with Clerk, check out their documentation [here](https://clerk.com/docs/deployments/overview). **Note that you will likely need to manage your own domain and do domain verification as part of the process.**
- Create a new file `.env.prod` locally and fill in all the production-environment secrets. Remember to update `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` by copying secrets from Clerk's production instance
Expand All @@ -118,7 +118,7 @@ You can fork this repo, make changes, and create a PR. Add **@ykhli or @timqian*

If you are new to contributing on github, here is a step-by-step guide:

1. Clcik on `Fork` on the top right of this page
1. Click on `Fork` on the top right of this page
2. Work on your change and push it to your forked repo. Now when you navigate to the forked repo's UI, you should see something like the following:
<img width="904" alt="pr-preview" src="https://github.com/a16z-infra/ai-getting-started/assets/3489963/631e5f45-39ec-4b54-b9d1-b963e279dcc6">

Expand All @@ -127,10 +127,9 @@ If you are new to contributing on github, here is a step-by-step guide:
4. Once you have a PR, you can add reviewers.

### Other contributions
Feel free to open feature requests, bug reports etc under Issues.
Feel free to open feature requests, bug reports, etc. under Issues.

## Refs
- https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/pinecone
- https://js.langchain.com/docs/modules/models/llms/integrations#replicate
- https://js.langchain.com/docs/modules/chains/index_related_chains/retrieval_qa

2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const inter = Inter({ subsets: ["latin"] });

export const metadata = {
title: "AI Getting Started",
description: "Help you setup an AI project with ease",
description: "Helping you set up an AI project with ease",
};

export default function RootLayout({
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Home() {
</h1>

<p className="mx-auto mt-4 max-w-xl text-center text-xl leading-8 text-slate-400">
Help you setup an AI project with ease. Here are two example use cases:
Helping you set up an AI project with ease. Here are two example use cases:
</p>

<Examples />
Expand Down