pub struct PromptsResource { /* private fields */ }Expand description
Audio prompts — /api/v2/prompts.
Implementations§
Source§impl PromptsResource
impl PromptsResource
Sourcepub async fn list_all(&self) -> Result<Vec<Prompt>, ManagerError>
pub async fn list_all(&self) -> Result<Vec<Prompt>, ManagerError>
List all prompts (auto-paginated).
Sourcepub async fn uses(&self, id: &str) -> Result<ObjectListResponse, ManagerError>
pub async fn uses(&self, id: &str) -> Result<ObjectListResponse, ManagerError>
List the objects that use a prompt by id.
Sourcepub async fn get(&self, id: &str) -> Result<PromptItemResponse, ManagerError>
pub async fn get(&self, id: &str) -> Result<PromptItemResponse, ManagerError>
Get a prompt by id.
Sourcepub async fn upload(
&self,
file: PathBuf,
filename: Option<&str>,
label: Option<&str>,
) -> Result<PromptItemResponse, ManagerError>
pub async fn upload( &self, file: PathBuf, filename: Option<&str>, label: Option<&str>, ) -> Result<PromptItemResponse, ManagerError>
Upload an audio prompt from a file, optionally overriding its filename and label.
Sourcepub async fn update(
&self,
id: &str,
body: RestUpdatePrompt,
) -> Result<PromptItemResponse, ManagerError>
pub async fn update( &self, id: &str, body: RestUpdatePrompt, ) -> Result<PromptItemResponse, ManagerError>
Update a prompt’s metadata.
Auto Trait Implementations§
impl !RefUnwindSafe for PromptsResource
impl !UnwindSafe for PromptsResource
impl Freeze for PromptsResource
impl Send for PromptsResource
impl Sync for PromptsResource
impl Unpin for PromptsResource
impl UnsafeUnpin for PromptsResource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more