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.
1 parent 51b9491 commit 0ce0d3bCopy full SHA for 0ce0d3b
examples/embedding.rs
@@ -7,8 +7,10 @@ use std::env;
7
async fn main() -> Result<(), Box<dyn std::error::Error>> {
8
let client = OpenAIClient::new(env::var("OPENAI_API_KEY").unwrap().to_string());
9
10
- let mut req =
11
- 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(),
12
+ vec!["story time".to_string(), "Once upon a time".to_string()],
13
+ );
14
req.dimensions = Some(10);
15
16
let result = client.embedding(req).await?;
0 commit comments