-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmixedbread-embedding-schema.json
More file actions
91 lines (91 loc) · 3.25 KB
/
Copy pathmixedbread-embedding-schema.json
File metadata and controls
91 lines (91 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://api-evangelist.com/schemas/mixedbread-ai/mixedbread-embedding-schema.json",
"title": "Mixedbread Embedding",
"description": "Schema for the Mixedbread Embeddings API request and response objects. Covers POST /v1/embeddings.",
"type": "object",
"definitions": {
"EmbeddingRequest": {
"type": "object",
"description": "Request body for creating embeddings.",
"required": ["model", "input"],
"properties": {
"model": {
"type": "string",
"description": "Embedding model identifier (e.g. mixedbread-ai/mxbai-embed-large-v1, mixedbread-ai/deepset-mxbai-embed-de-large-v1, mixedbread-ai/mxbai-embed-xsmall-v1, mixedbread-ai/wholembed-v3)."
},
"input": {
"description": "Single string, array of strings, or array of image/text objects to embed.",
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}},
{"type": "array", "items": {"type": "object"}}
]
},
"dimensions": {
"type": "integer",
"description": "Matryoshka truncation dimension. Optional."
},
"prompt": {
"type": "string",
"description": "Instruction prefix applied to inputs (e.g. 'Represent this sentence for searching relevant passages')."
},
"encoding_format": {
"description": "Encoding(s) requested.",
"oneOf": [
{"type": "string", "enum": ["float", "float32", "int8", "uint8", "binary", "ubinary", "base64"]},
{"type": "array", "items": {"type": "string"}}
]
},
"normalized": {
"type": "boolean",
"description": "Whether to L2-normalize vectors."
}
}
},
"Embedding": {
"type": "object",
"required": ["object", "embedding", "index"],
"properties": {
"object": {"type": "string", "const": "embedding"},
"index": {"type": "integer"},
"embedding": {
"description": "Dense vector (or encoded representation).",
"oneOf": [
{"type": "array", "items": {"type": "number"}},
{"type": "string", "description": "Base64-encoded vector"},
{"type": "object", "description": "Multi-encoding embedding keyed by encoding format"}
]
}
}
},
"EmbeddingResponse": {
"type": "object",
"required": ["model", "data", "usage"],
"properties": {
"object": {"type": "string", "const": "list"},
"model": {"type": "string"},
"data": {"type": "array", "items": {"$ref": "#/definitions/Embedding"}},
"usage": {
"type": "object",
"properties": {
"prompt_tokens": {"type": "integer"},
"total_tokens": {"type": "integer"}
}
},
"normalized": {"type": "boolean"},
"encoding_format": {
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}}
]
},
"dimensions": {"type": "integer"}
}
}
},
"oneOf": [
{"$ref": "#/definitions/EmbeddingRequest"},
{"$ref": "#/definitions/EmbeddingResponse"}
]
}