• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / functions-js / 12398927075

18 Dec 2024 06:18PM UTC coverage: 74.775% (-0.9%) from 75.684%
12398927075

push

github

web-flow
Merge pull request #92 from nyannyacha/fix-add-wait-until-typing

fix: add a type for `EdgeRuntime.waitUntil`

30 of 39 branches covered (76.92%)

Branch coverage included in aggregate %.

0 of 4 new or added lines in 1 file covered. (0.0%)

219 of 294 relevant lines covered (74.49%)

6.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/edge-runtime.d.ts
1
declare namespace Supabase {
×
2
  export interface ModelOptions {
×
3
    /**
×
4
     * Pool embeddings by taking their mean. Applies only for `gte-small` model
×
5
     */
×
6
    mean_pool?: boolean
×
7

×
8
    /**
×
9
     * Normalize the embeddings result. Applies only for `gte-small` model
×
10
     */
×
11
    normalize?: boolean
×
12

×
13
    /**
×
14
     * Stream response from model. Applies only for LLMs like `mistral` (default: false)
×
15
     */
×
16
    stream?: boolean
×
17

×
18
    /**
×
19
     * Automatically abort the request to the model after specified time (in seconds). Applies only for LLMs like `mistral` (default: 60)
×
20
     */
×
21
    timeout?: number
×
22

×
23
    /**
×
24
     * Mode for the inference API host. (default: 'ollama')
×
25
     */
×
26
    mode?: 'ollama' | 'openaicompatible'
×
27
    signal?: AbortSignal
×
28
  }
×
29

×
30
  export class Session {
×
31
    /**
×
32
     * Create a new model session using given model
×
33
     */
×
34
    constructor(model: string, sessionOptions?: unknown)
×
35

×
36
    /**
×
37
     * Execute the given prompt in model session
×
38
     */
×
39
    run(
×
40
      prompt:
×
41
        | string
×
42
        | Omit<import('openai').OpenAI.Chat.ChatCompletionCreateParams, 'model' | 'stream'>,
×
43
      modelOptions?: ModelOptions
×
44
    ): unknown
×
45
  }
×
46

×
47
  /**
×
48
   * Provides AI related APIs
×
49
   */
×
50
  export interface Ai {
×
51
    readonly Session: typeof Session
×
52
  }
×
53

×
54
  /**
×
55
   * Provides AI related APIs
×
56
   */
×
57
  export const ai: Ai
×
58
}
×
NEW
59

×
NEW
60
declare namespace EdgeRuntime {
×
NEW
61
  export function waitUntil<T>(promise: Promise<T>): Promise<T>;
×
NEW
62
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc