Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: replace deprecated execute method with completion #19

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading