Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: Supabase AI types in examples (#22751)

Bobbie Soedirgo5c062fcdb79f
diff --git a/examples/ai/edge-functions/supabase/functions/generate-embedding/index.ts b/examples/ai/edge-functions/supabase/functions/generate-embedding/index.ts
index 81ed721a591..4befba0338f 100644
--- a/examples/ai/edge-functions/supabase/functions/generate-embedding/index.ts
+++ b/examples/ai/edge-functions/supabase/functions/generate-embedding/index.ts
@@ -1,3 +1,4 @@
+/// <reference types="https://esm.sh/@supabase/[email protected]/src/edge-runtime.d.ts" />
import { createClient } from "npm:@supabase/[email protected]";
import { Database, Tables } from "../_shared/database.types.ts";
@@ -14,7 +15,6 @@ const supabase = createClient<Database>(
Deno.env.get("SUPABASE_URL")!,
Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!,
);
-// @ts-ignore TODO: import Supabase AI types.
const model = new Supabase.ai.Session("gte-small");
Deno.serve(async (req) => {
diff --git a/examples/ai/edge-functions/supabase/functions/search/index.ts b/examples/ai/edge-functions/supabase/functions/search/index.ts
index 7f3d1742eaa..a4551d25a3e 100644
--- a/examples/ai/edge-functions/supabase/functions/search/index.ts
+++ b/examples/ai/edge-functions/supabase/functions/search/index.ts
@@ -1,3 +1,4 @@
+/// <reference types="https://esm.sh/@supabase/[email protected]/src/edge-runtime.d.ts" />
import { createClient } from "npm:@supabase/[email protected]";
import { Database } from "../_shared/database.types.ts";
@@ -5,7 +6,6 @@ const supabase = createClient<Database>(
Deno.env.get("SUPABASE_URL")!,
Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!,
);
-// @ts-ignore TODO: import Supabase AI types.
const model = new Supabase.ai.Session("gte-small");
Deno.serve(async (req) => {