From ef0b7b2ea15266f00bd28202a32fd8a4e3a4f856 Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Mon, 15 Apr 2024 06:52:11 +1000 Subject: [PATCH] feat: add Edge Runtime global types --- src/edge-runtime.d.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/edge-runtime.d.ts diff --git a/src/edge-runtime.d.ts b/src/edge-runtime.d.ts new file mode 100644 index 0000000..0c1aa02 --- /dev/null +++ b/src/edge-runtime.d.ts @@ -0,0 +1,21 @@ +interface ModelOptions { + mean_pool?: boolean + normalize?: boolean + stream?: boolean + timeout?: number +} + +interface Session { + run(prompt: string, modelOptions?: ModelOptions): unknown +} + +declare var Session: { + prototype: Session + new (modelName: string, sessionOptions?: unknown): Session +} + +declare var Supabase: { + readonly ai: { + readonly Session: typeof Session + } +}