Skip to content

Commit bc12abc

Browse files
committed
chore: add typedocs for model options
1 parent ef0b7b2 commit bc12abc

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/edge-runtime.d.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
11
interface ModelOptions {
2+
/**
3+
* Pool embeddings by taking their mean. Applies only for `gte-small` model
4+
*/
25
mean_pool?: boolean
6+
7+
/**
8+
* Normalize the embeddings result. Applies only for `gte-small` model
9+
*/
310
normalize?: boolean
11+
12+
/**
13+
* Stream response from model. Applies only for LLMs like `mistral` (default: false)
14+
*/
415
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+
*/
520
timeout?: number
621
}
722

823
interface Session {
24+
/**
25+
* Execute the given prompt in model session
26+
*/
927
run(prompt: string, modelOptions?: ModelOptions): unknown
1028
}
1129

1230
declare var Session: {
1331
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
1536
}
1637

1738
declare var Supabase: {
39+
/**
40+
* Provides AI related APIs
41+
*/
1842
readonly ai: {
1943
readonly Session: typeof Session
2044
}

0 commit comments

Comments
 (0)