Skip to content

Commit 3652473

Browse files
committed
Improved example [skip ci]
1 parent f1f650e commit 3652473

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/cohere/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn fetch_embeddings(texts: &[&str], input_type: &str) -> Result<Vec<Vec<u8>>, Bo
5656
v.as_array()
5757
.unwrap()
5858
.iter()
59-
.map(|v| v.as_f64().unwrap() as u8)
59+
.map(|v| v.as_u64().unwrap().try_into().unwrap())
6060
.collect()
6161
})
6262
.collect();

0 commit comments

Comments
 (0)