The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: Update AI section keys (#45161)
Chris Chinchilla03f6083b1bd5
diff --git a/apps/docs/content/guides/ai/examples/building-chatgpt-plugins.mdx b/apps/docs/content/guides/ai/examples/building-chatgpt-plugins.mdxindex ff4b76fe86e..b6dfa676b9d 100644--- a/apps/docs/content/guides/ai/examples/building-chatgpt-plugins.mdx+++ b/apps/docs/content/guides/ai/examples/building-chatgpt-plugins.mdx@@ -62,7 +62,7 @@ Create a [Supabase project](/dashboard) and database by following the instructioexport OPENAI_API_KEY=<open_ai_api_key>export DATASTORE=supabaseexport SUPABASE_URL=<supabase_url>-export SUPABASE_SERVICE_ROLE_KEY=<supabase_key>+export SUPABASE_SECRET_KEY=<supabase_secret_key>```For Postgres datastore, you'll need to export these environment variables instead:diff --git a/apps/docs/content/guides/ai/examples/headless-vector-search.mdx b/apps/docs/content/guides/ai/examples/headless-vector-search.mdxindex 7bbf9afc8ba..fdf21d12cd5 100644--- a/apps/docs/content/guides/ai/examples/headless-vector-search.mdx+++ b/apps/docs/content/guides/ai/examples/headless-vector-search.mdx@@ -65,12 +65,12 @@ jobs:- uses: supabase/[email protected] # Update this to the latest version.with:supabase-url: 'https://your-project-ref.supabase.co' # Update this to your project URL.- supabase-service-role-key: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}+ supabase-secret-key: ${{ secrets.SUPABASE_SECRET_KEY }}openai-key: ${{ secrets.OPENAI_API_KEY }}docs-root-path: 'docs' # the path to the root of your md(x) files```-Make sure to choose the latest version, and set your `SUPABASE_SERVICE_ROLE_KEY` and `OPENAI_API_KEY` as repository secrets in your repo settings (settings > secrets > actions).+Make sure to choose the latest version, and set your `SUPABASE_SECRET_KEY` and `OPENAI_API_KEY` as repository secrets in your repo settings (settings > secrets > actions).### Add a search interfacediff --git a/apps/docs/content/guides/ai/examples/nextjs-vector-search.mdx b/apps/docs/content/guides/ai/examples/nextjs-vector-search.mdxindex 7bd534938ab..c908ab87638 100644--- a/apps/docs/content/guides/ai/examples/nextjs-vector-search.mdx+++ b/apps/docs/content/guides/ai/examples/nextjs-vector-search.mdx@@ -284,7 +284,7 @@ With our database set up, we need to process and store all `.mdx` files in the ````bashNEXT_PUBLIC_SUPABASE_URL=NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=- SUPABASE_SERVICE_ROLE_KEY=+ SUPABASE_SECRET_KEY=# Get your key at https://platform.openai.com/account/api-keysOPENAI_API_KEY=diff --git a/apps/docs/content/guides/ai/hybrid-search.mdx b/apps/docs/content/guides/ai/hybrid-search.mdxindex 69a6fafa9de..44a682da120 100644--- a/apps/docs/content/guides/ai/hybrid-search.mdx+++ b/apps/docs/content/guides/ai/hybrid-search.mdx@@ -168,7 +168,7 @@ import { createClient } from 'npm:@supabase/supabase-js@2'import OpenAI from 'npm:openai'const supabaseUrl = Deno.env.get('SUPABASE_URL')!-const supabaseServiceRoleKey = Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')!+const supabaseSecretKey = Deno.env.get('SUPABASE_SECRET_KEY')!const openaiApiKey = Deno.env.get('OPENAI_API_KEY')!Deno.serve(async (req) => {diff --git a/apps/docs/content/guides/ai/langchain.mdx b/apps/docs/content/guides/ai/langchain.mdxindex a3d709b0ec3..b089cb4ab5e 100644--- a/apps/docs/content/guides/ai/langchain.mdx+++ b/apps/docs/content/guides/ai/langchain.mdx@@ -82,8 +82,8 @@ import { SupabaseVectorStore } from '@langchain/community/vectorstores/supabase'import { OpenAIEmbeddings } from '@langchain/openai'import { createClient } from '@supabase/supabase-js'-const supabaseKey = process.env.SUPABASE_SERVICE_ROLE_KEY-if (!supabaseKey) throw new Error(`Expected SUPABASE_SERVICE_ROLE_KEY`)+const supabaseKey = process.env.SUPABASE_SECRET_KEY+if (!supabaseKey) throw new Error(`Expected SUPABASE_SECRET_KEY`)const url = process.env.SUPABASE_URLif (!url) throw new Error(`Expected env var SUPABASE_URL`)@@ -119,8 +119,8 @@ import { createClient } from '@supabase/supabase-js'// First, follow set-up instructions above-const privateKey = process.env.SUPABASE_SERVICE_ROLE_KEY-if (!privateKey) throw new Error(`Expected env var SUPABASE_SERVICE_ROLE_KEY`)+const privateKey = process.env.SUPABASE_SECRET_KEY+if (!privateKey) throw new Error(`Expected env var SUPABASE_SECRET_KEY`)const url = process.env.SUPABASE_URLif (!url) throw new Error(`Expected env var SUPABASE_URL`)@@ -158,8 +158,8 @@ import { createClient } from '@supabase/supabase-js'// First, follow set-up instructions above-const privateKey = process.env.SUPABASE_SERVICE_ROLE_KEY-if (!privateKey) throw new Error(`Expected env var SUPABASE_SERVICE_ROLE_KEY`)+const privateKey = process.env.SUPABASE_SECRET_KEY+if (!privateKey) throw new Error(`Expected env var SUPABASE_SECRET_KEY`)const url = process.env.SUPABASE_URLif (!url) throw new Error(`Expected env var SUPABASE_URL`)diff --git a/apps/docs/content/guides/ai/quickstarts/generate-text-embeddings.mdx b/apps/docs/content/guides/ai/quickstarts/generate-text-embeddings.mdxindex b520bf11ad4..f6921cebd91 100644--- a/apps/docs/content/guides/ai/quickstarts/generate-text-embeddings.mdx+++ b/apps/docs/content/guides/ai/quickstarts/generate-text-embeddings.mdx@@ -138,12 +138,12 @@ Let's build an Edge Function that will accept an input string and generate an em```shellcurl --request POST 'http://localhost:54321/functions/v1/embed' \- --header 'Authorization: Bearer ANON_KEY' \--header 'Content-Type: application/json' \+ --header 'apikey: SUPABASE_PUBLISHABLE_KEY' \--data '{ "input": "hello world" }'```- Be sure to replace `ANON_KEY` with your project's anonymous key. You can get this key by running `supabase status`.+ Be sure to replace `SUPABASE_PUBLISHABLE_KEY` with your project's publishable key. You can get this key by running `supabase status`.</StepHikeCompact.Details>