The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: move to openai tutorial section.
thorwebdev3670759c62ba
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.tsindex 5f201c96972..0ae57866580 100644--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts@@ -52,10 +52,6 @@ export const gettingstarted = {{name: 'Use Cases',items: [- {- name: 'OpenAI Vector Search',- url: '/guides/getting-started/quickstarts/openai-vector-search',- },{name: 'Subscription Payments (SaaS)',url: 'https://github.com/vercel/nextjs-subscription-payments#nextjs-subscription-payments-starter',@@ -66,6 +62,15 @@ export const gettingstarted = {},],},+ {+ name: 'OpenAI',+ items: [+ {+ name: 'Vector Search',+ url: '/guides/getting-started/openai/vector-search',+ },+ ],+ },{name: 'Framework Quickstarts',items: [diff --git a/apps/docs/pages/guides/getting-started.mdx b/apps/docs/pages/guides/getting-started.mdxindex ef9770f52b4..c66817a7d0d 100644--- a/apps/docs/pages/guides/getting-started.mdx+++ b/apps/docs/pages/guides/getting-started.mdx@@ -103,7 +103,7 @@ export const meta = {export const useCases = [{title: 'OpenAI Vector Search',- href: '/guides/getting-started/quickstarts/openai-vector-search',+ href: '/guides/getting-started/openai/vector-search',description: `Build your own custom ChatGPT with Next.js, OpenAI and pg_vector.`,icon: '/docs/img/icons/openai_logo',},diff --git a/apps/docs/pages/guides/getting-started/quickstarts/openai-vector-search.mdx b/apps/docs/pages/guides/getting-started/openai/vector-search.mdxsimilarity index 92%rename from apps/docs/pages/guides/getting-started/quickstarts/openai-vector-search.mdxrename to apps/docs/pages/guides/getting-started/openai/vector-search.mdxindex 5dcfc41eee3..cabeef461f2 100644--- a/apps/docs/pages/guides/getting-started/quickstarts/openai-vector-search.mdx+++ b/apps/docs/pages/guides/getting-started/openai/vector-search.mdx@@ -2,19 +2,45 @@ import Layout from '~/layouts/DefaultGuideLayout'import StepHikeCompact from '~/components/StepHikeCompact'export const meta = {- title: 'Supabase with OpenAI',+ title: 'OpenAI Embeddings & Vector Search',subtitle:'Learn how to build your own custom ChatGPT style doc search powered by Next.js, OpenAI, and Supabase.',breadcrumb: 'OpenAI',}-Some time ago we've built [Supabase Clippy](https://supabase.com/blog/chatgpt-supabase-docs) a ChatGPT for the Supabase Docs. In this tutorial we'll look at how you can build your own custom ChatGPT experience based on your own knowledge base.+We've built [Supabase Clippy](https://supabase.com/blog/chatgpt-supabase-docs) a ChatGPT for the Supabase Docs. In this tutorial we'll look at how you can build your own custom ChatGPT experience based on your own knowledge base.We assume that you have a Next.js project with a collection of `.mdx` files nested inside your `pages` directory. We will start developing locally with the Supabase CLI and then push our local database changes to our hosted Supabase project.-You can find the complete code, ready to be deployed to Vercel, [on GitHub](https://github.com/supabase-community/nextjs-openai-doc-search).+<Admonition type="note">+ If you get stuck while working through this guide, refer to the [full example on+ GitHub](https://github.com/supabase-community/nextjs-openai-doc-search).+</Admonition>-## Configure the Database+## Create a project++1. [Create a new project](https://app.supabase.com) in the Supabase Dashboard.+1. Enter your project details.+1. Wait for the new database to launch.++## Set up the database++Now we are going to set up the database schema. We can use the "OpenAI Vector Search" quickstart in the SQL Editor, or you can just copy/paste the SQL from below and run it yourself.++<Tabs+ scrollable+ size="small"+ type="underlined"+ defaultActiveId="dashboard"+>+<TabPanel id="dashboard" label="Dashboard">++1. Go to the [SQL Editor](https://app.supabase.com/project/_/sql) page in the Dashboard.+2. Click **OpenAI Vector Search**.+3. Click **Run**.++</TabPanel>+<TabPanel id="sql" label="SQL"><StepHikeCompact>@@ -195,6 +221,9 @@ You can find the complete code, ready to be deployed to Vercel, [on GitHub](http</StepHikeCompact>+</TabPanel>+</Tabs>+## Pre-process the knowledge base at build timeNow that our database is set up, we will write a script to process all `.mdx` files in the `pages` directory. You can find the full script [here](https://github.com/supabase-community/nextjs-openai-doc-search/blob/main/lib/generate-embeddings.ts).