cargo fmt

This commit is contained in:
Dongri Jin
2024-11-09 08:45:34 +09:00
parent 51b9491de9
commit 0ce0d3bbb7

View File

@ -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?;