Skip to content

Commit

Permalink
docs: replace deprecated execute method with completion
Browse files Browse the repository at this point in the history
  • Loading branch information
moldhouse authored and pacman82 committed Jun 13, 2024
1 parent 4be1eb3 commit f5ce358
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! let task = TaskCompletion::from_text("An apple a day", 10);
//!
//! // Retrieve the answer from the API
//! let response = client.execute(model, &task, &How::default()).await.unwrap();
//! let response = client.completion(&task, model, &How::default()).await.unwrap();
//!
//! // Print entire sentence with completion
//! println!("An apple a day{}", response.completion);
Expand Down
6 changes: 3 additions & 3 deletions src/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<'a> Modality<'a> {
/// The model can only see squared pictures. Images are centercropped.
///
/// ```no_run
/// use aleph_alpha_client::{Client, How, Modality, Prompt, Sampling, Stopping, TaskCompletion};
/// use aleph_alpha_client::{Client, How, Modality, Prompt, Sampling, Stopping, TaskCompletion, Task};
/// use dotenv::dotenv;
/// use std::path::PathBuf;
///
Expand All @@ -102,8 +102,8 @@ impl<'a> Modality<'a> {
/// };
/// // Execute
/// let model = "luminous-base";
/// let client = Client::new(&aa_api_token).unwrap();
/// let response = client.execute(model, &task, &How::default()).await.unwrap();
/// let job = task.with_model(model);
/// let response = client.output_of(&job, &How::default()).await.unwrap();
/// // Show result
/// println!("{}", response.completion);
/// }
Expand Down

0 comments on commit f5ce358

Please sign in to comment.