File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 1
1
interface ModelOptions {
2
+ /**
3
+ * Pool embeddings by taking their mean. Applies only for `gte-small` model
4
+ */
2
5
mean_pool ?: boolean
6
+
7
+ /**
8
+ * Normalize the embeddings result. Applies only for `gte-small` model
9
+ */
3
10
normalize ?: boolean
11
+
12
+ /**
13
+ * Stream response from model. Applies only for LLMs like `mistral` (default: false)
14
+ */
4
15
stream ?: boolean
16
+
17
+ /**
18
+ * Automatically abort the request to the model after specified time (in seconds). Applies only for LLMs like `mistral` (default: 60)
19
+ */
5
20
timeout ?: number
6
21
}
7
22
8
23
interface Session {
24
+ /**
25
+ * Execute the given prompt in model session
26
+ */
9
27
run ( prompt : string , modelOptions ?: ModelOptions ) : unknown
10
28
}
11
29
12
30
declare var Session : {
13
31
prototype : Session
14
- new ( modelName : string , sessionOptions ?: unknown ) : Session
32
+ /**
33
+ * Create a new model session using given model
34
+ */
35
+ new ( model : string , sessionOptions ?: unknown ) : Session
15
36
}
16
37
17
38
declare var Supabase : {
39
+ /**
40
+ * Provides AI related APIs
41
+ */
18
42
readonly ai : {
19
43
readonly Session : typeof Session
20
44
}
You can’t perform that action at this time.
0 commit comments