We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6eb896d + 7a11e3f commit 84e1fe7Copy full SHA for 84e1fe7
embeddings/src/main.rs
@@ -137,7 +137,14 @@ fn main() -> Result<()> {
137
for (i, token_line) in tokens_lines_list.iter().enumerate() {
138
eprintln!("Prompt {i}");
139
for token in token_line {
140
- eprintln!(" {} --> {}", token, model.token_to_str(*token)?);
+ // Attempt to convert token to string and print it; if it fails, print the token instead
141
+ match model.token_to_str(*token) {
142
+ Ok(token_str) => eprintln!(" {} --> {}", token, token_str),
143
+ Err(e) => {
144
+ eprintln!("Failed to convert token to string, error: {}", e);
145
+ eprintln!("Token value: {}", token);
146
+ }
147
148
}
149
eprintln!();
150
0 commit comments