You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy."
74
+
}
75
+
},
76
+
"required": [
77
+
"text"
78
+
]
79
+
},
80
+
{
81
+
"properties": {
82
+
"requests": {
49
83
"type": "array",
50
-
"description": "Batch of text values to embed",
84
+
"description": "Batch of the embeddings requests to run using async-queue",
51
85
"items": {
52
-
"type": "string",
53
-
"description": "The text to embed",
54
-
"minLength": 1
55
-
},
56
-
"maxItems": 100
86
+
"properties": {
87
+
"text": {
88
+
"oneOf": [
89
+
{
90
+
"type": "string",
91
+
"description": "The text to embed",
92
+
"minLength": 1
93
+
},
94
+
{
95
+
"type": "array",
96
+
"description": "Batch of text values to embed",
97
+
"items": {
98
+
"type": "string",
99
+
"description": "The text to embed",
100
+
"minLength": 1
101
+
},
102
+
"maxItems": 100
103
+
}
104
+
]
105
+
},
106
+
"pooling": {
107
+
"type": "string",
108
+
"enum": [
109
+
"mean",
110
+
"cls"
111
+
],
112
+
"default": "mean",
113
+
"description": "The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy."
114
+
}
115
+
},
116
+
"required": [
117
+
"text"
118
+
]
119
+
}
57
120
}
121
+
},
122
+
"required": [
123
+
"requests"
58
124
]
59
125
}
60
-
},
61
-
"required": [
62
-
"text"
63
126
]
64
127
},
65
128
"output": {
66
-
"type": "object",
67
-
"contentType": "application/json",
68
-
"properties": {
69
-
"shape": {
70
-
"type": "array",
71
-
"items": {
72
-
"type": "number"
129
+
"oneOf": [
130
+
{
131
+
"type": "object",
132
+
"contentType": "application/json",
133
+
"properties": {
134
+
"shape": {
135
+
"type": "array",
136
+
"items": {
137
+
"type": "number"
138
+
}
139
+
},
140
+
"data": {
141
+
"type": "array",
142
+
"description": "Embeddings of the requested text values",
143
+
"items": {
144
+
"type": "array",
145
+
"description": "Floating point embedding representation shaped by the embedding model",
146
+
"items": {
147
+
"type": "number"
148
+
}
149
+
}
150
+
},
151
+
"pooling": {
152
+
"type": "string",
153
+
"enum": [
154
+
"mean",
155
+
"cls"
156
+
],
157
+
"description": "The pooling method used in the embedding process."
158
+
}
73
159
}
74
160
},
75
-
"data": {
76
-
"type": "array",
77
-
"description": "Embeddings of the requested text values",
78
-
"items": {
79
-
"type": "array",
80
-
"description": "Floating point embedding representation shaped by the embedding model",
81
-
"items": {
82
-
"type": "number"
161
+
{
162
+
"type": "object",
163
+
"contentType": "application/json",
164
+
"title": "Async response",
165
+
"properties": {
166
+
"request_id": {
167
+
"type": "string",
168
+
"description": "The async request id that can be used to obtain the results."
0 commit comments