Skip to content

Commit

Permalink
docs: add Supabase runtime api type defs
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnr committed Apr 22, 2024
1 parent a6ba0c0 commit 75dfaf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,9 @@ Now let's add logic to generate embeddings automatically anytime new rows are ad
1. In `embed/index.ts`, create an inference session using Supabase's AI inference engine.
```tsx
// Setup type definitions for built-in Supabase Runtime APIs
/// <reference types="https://esm.sh/@supabase/functions-js/src/edge-runtime.d.ts" />
import { createClient } from '@supabase/supabase-js';
const model = new Supabase.ai.Session('gte-small');
Expand Down
3 changes: 2 additions & 1 deletion supabase/functions/embed/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// <reference types="https://esm.sh/v135/@supabase/[email protected]/src/edge-runtime.d.ts" />
// Setup type definitions for built-in Supabase Runtime APIs
/// <reference types="https://esm.sh/@supabase/functions-js/src/edge-runtime.d.ts" />

import { createClient } from '@supabase/supabase-js';
import { Database } from '../_lib/database.ts';
Expand Down

0 comments on commit 75dfaf5

Please sign in to comment.