@@ -72,7 +72,7 @@ impl Tokenization {
72
72
) -> Result < ValidEncoding , TextEmbeddingsError > {
73
73
// Check if inputs is empty
74
74
if inputs. is_empty ( ) {
75
- return Err ( TextEmbeddingsError :: Validation (
75
+ return Err ( TextEmbeddingsError :: Empty (
76
76
"`inputs` cannot be empty" . to_string ( ) ,
77
77
) ) ;
78
78
}
@@ -107,7 +107,7 @@ impl Tokenization {
107
107
) -> Result < ( Option < String > , RawEncoding ) , TextEmbeddingsError > {
108
108
// Check if inputs is empty
109
109
if inputs. is_empty ( ) {
110
- return Err ( TextEmbeddingsError :: Validation (
110
+ return Err ( TextEmbeddingsError :: Empty (
111
111
"`inputs` cannot be empty" . to_string ( ) ,
112
112
) ) ;
113
113
}
@@ -138,9 +138,9 @@ impl Tokenization {
138
138
ids : Vec < u32 > ,
139
139
skip_special_tokens : bool ,
140
140
) -> Result < String , TextEmbeddingsError > {
141
- // Check if inputs is empty
141
+ // Check if input_ids is empty
142
142
if ids. is_empty ( ) {
143
- return Err ( TextEmbeddingsError :: Validation (
143
+ return Err ( TextEmbeddingsError :: Empty (
144
144
"`input_ids` cannot be empty" . to_string ( ) ,
145
145
) ) ;
146
146
}
0 commit comments