@@ -43,11 +43,11 @@ private constructor(
43
43
/* *
44
44
* Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a
45
45
* single request, pass an array of strings or array of token arrays. The input must not exceed
46
- * the max input tokens for the model (8192 tokens for `text- embedding-ada-002` ), cannot be an
47
- * empty string, and any array must be 2048 dimensions or less.
46
+ * the max input tokens for the model (8192 tokens for all embedding models ), cannot be an empty
47
+ * string, and any array must be 2048 dimensions or less.
48
48
* [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
49
- * for counting tokens. Some models may also impose a limit on total number of tokens summed
50
- * across inputs.
49
+ * for counting tokens. In addition to the per-input token limit, all embedding models enforce a
50
+ * maximum of 300,000 tokens summed across all inputs in a single request .
51
51
*
52
52
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
53
53
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -181,11 +181,11 @@ private constructor(
181
181
/* *
182
182
* Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in
183
183
* a single request, pass an array of strings or array of token arrays. The input must not
184
- * exceed the max input tokens for the model (8192 tokens for `text- embedding-ada-002`),
185
- * cannot be an empty string, and any array must be 2048 dimensions or less.
184
+ * exceed the max input tokens for the model (8192 tokens for all embedding models), cannot
185
+ * be an empty string, and any array must be 2048 dimensions or less.
186
186
* [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
187
- * for counting tokens. Some models may also impose a limit on total number of tokens summed
188
- * across inputs.
187
+ * for counting tokens. In addition to the per-input token limit, all embedding models
188
+ * enforce a maximum of 300,000 tokens summed across all inputs in a single request .
189
189
*/
190
190
fun input (input : Input ) = apply { body.input(input) }
191
191
@@ -460,11 +460,11 @@ private constructor(
460
460
/* *
461
461
* Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in
462
462
* a single request, pass an array of strings or array of token arrays. The input must not
463
- * exceed the max input tokens for the model (8192 tokens for `text- embedding-ada-002`),
464
- * cannot be an empty string, and any array must be 2048 dimensions or less.
463
+ * exceed the max input tokens for the model (8192 tokens for all embedding models), cannot
464
+ * be an empty string, and any array must be 2048 dimensions or less.
465
465
* [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
466
- * for counting tokens. Some models may also impose a limit on total number of tokens summed
467
- * across inputs.
466
+ * for counting tokens. In addition to the per-input token limit, all embedding models
467
+ * enforce a maximum of 300,000 tokens summed across all inputs in a single request .
468
468
*
469
469
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
470
470
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -598,12 +598,11 @@ private constructor(
598
598
/* *
599
599
* Input text to embed, encoded as a string or array of tokens. To embed multiple inputs
600
600
* in a single request, pass an array of strings or array of token arrays. The input
601
- * must not exceed the max input tokens for the model (8192 tokens for
602
- * `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048
603
- * dimensions or less.
601
+ * must not exceed the max input tokens for the model (8192 tokens for all embedding
602
+ * models), cannot be an empty string, and any array must be 2048 dimensions or less.
604
603
* [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
605
- * for counting tokens. Some models may also impose a limit on total number of tokens
606
- * summed across inputs.
604
+ * for counting tokens. In addition to the per-input token limit, all embedding models
605
+ * enforce a maximum of 300,000 tokens summed across all inputs in a single request .
607
606
*/
608
607
fun input (input : Input ) = input(JsonField .of(input))
609
608
@@ -807,11 +806,11 @@ private constructor(
807
806
/* *
808
807
* Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a
809
808
* single request, pass an array of strings or array of token arrays. The input must not exceed
810
- * the max input tokens for the model (8192 tokens for `text- embedding-ada-002` ), cannot be an
811
- * empty string, and any array must be 2048 dimensions or less.
809
+ * the max input tokens for the model (8192 tokens for all embedding models ), cannot be an empty
810
+ * string, and any array must be 2048 dimensions or less.
812
811
* [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
813
- * for counting tokens. Some models may also impose a limit on total number of tokens summed
814
- * across inputs.
812
+ * for counting tokens. In addition to the per-input token limit, all embedding models enforce a
813
+ * maximum of 300,000 tokens summed across all inputs in a single request .
815
814
*/
816
815
@JsonDeserialize(using = Input .Deserializer ::class )
817
816
@JsonSerialize(using = Input .Serializer ::class )
0 commit comments