Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dongri committed Nov 8, 2024
1 parent 51b9491 commit 0ce0d3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/embedding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ use std::env;
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = OpenAIClient::new(env::var("OPENAI_API_KEY").unwrap().to_string());

let mut req =
EmbeddingRequest::new(TEXT_EMBEDDING_3_SMALL.to_string(), vec!["story time".to_string(), "Once upon a time".to_string()]);
let mut req = EmbeddingRequest::new(
TEXT_EMBEDDING_3_SMALL.to_string(),
vec!["story time".to_string(), "Once upon a time".to_string()],
);
req.dimensions = Some(10);

let result = client.embedding(req).await?;
Expand Down

0 comments on commit 0ce0d3b

Please sign in to comment.