1
package api
1
package api
2
2
3
type EmbedRequest struct {
3
type EmbedRequest struct {
4
// Text should be shorter than ~8000 tokens.
4
// Text should be shorter than ~8000 tokens.
5
Text string `json:"text"`
5
Text string `json:"text"`
6
6
7
// Model is an embedding model name.
7
// Model is an embedding model name.
8
// These are hard-coded in //funky/builtins.
8
// These are hard-coded in //funky/builtins.
9
// A good choice is "openai:text-embedding-3-small".
9
// A good choice is "openai:text-embedding-3-small".
10
Model string `json:"model"`
10
Model string `json:"model"`
11
11
12
// Dims is the number of vector dimensions to return.
12
// Dims is the number of vector dimensions to return.
13
// A good chioce is 1536 for openai:text-embedding-3-small.
13
// A good chioce is 1536 for openai:text-embedding-3-small.
14
Dims int `json:"dims"`
14
Dims int `json:"dims"`
15
15
16
// FullPath returns a sequence of vectors, one per prefix of Text.
16
// FullPath returns a sequence of vectors, one per prefix of Text.
17
// Instead of the usual array of numbers, you'll get a 2D array.
17
// Instead of the usual array of numbers, you'll get a 2D array.
18
FullPath bool `json:"l_path"`
18
FullPath bool `json:"l_path"`
19
}
19
}