@@ -72,7 +72,7 @@ impl Tokenization {
7272 ) -> Result < ValidEncoding , TextEmbeddingsError > {
7373 // Check if inputs is empty
7474 if inputs. is_empty ( ) {
75- return Err ( TextEmbeddingsError :: Validation (
75+ return Err ( TextEmbeddingsError :: Empty (
7676 "`inputs` cannot be empty" . to_string ( ) ,
7777 ) ) ;
7878 }
@@ -107,7 +107,7 @@ impl Tokenization {
107107 ) -> Result < ( Option < String > , RawEncoding ) , TextEmbeddingsError > {
108108 // Check if inputs is empty
109109 if inputs. is_empty ( ) {
110- return Err ( TextEmbeddingsError :: Validation (
110+ return Err ( TextEmbeddingsError :: Empty (
111111 "`inputs` cannot be empty" . to_string ( ) ,
112112 ) ) ;
113113 }
@@ -138,9 +138,9 @@ impl Tokenization {
138138 ids : Vec < u32 > ,
139139 skip_special_tokens : bool ,
140140 ) -> Result < String , TextEmbeddingsError > {
141- // Check if inputs is empty
141+ // Check if input_ids is empty
142142 if ids. is_empty ( ) {
143- return Err ( TextEmbeddingsError :: Validation (
143+ return Err ( TextEmbeddingsError :: Empty (
144144 "`input_ids` cannot be empty" . to_string ( ) ,
145145 ) ) ;
146146 }
0 commit comments