pub struct PromptTask { /* private fields */ }Expand description
A simple prompt-based automation task.
Implementations§
Source§impl PromptTask
impl PromptTask
Sourcepub fn new(config: AutomationConfig, prompt: impl Into<String>) -> Self
pub fn new(config: AutomationConfig, prompt: impl Into<String>) -> Self
Create a new prompt task.
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Set the model to use.
Trait Implementations§
Source§impl AutomationTask for PromptTask
impl AutomationTask for PromptTask
Source§fn config(&self) -> &AutomationConfig
fn config(&self) -> &AutomationConfig
Get the task’s configuration.
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
client: &'life1 AsyncForgeClient,
context: &'life2 mut TaskContext,
) -> Pin<Box<dyn Future<Output = AutomationResult<TaskOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
client: &'life1 AsyncForgeClient,
context: &'life2 mut TaskContext,
) -> Pin<Box<dyn Future<Output = AutomationResult<TaskOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the task.
Auto Trait Implementations§
impl Freeze for PromptTask
impl RefUnwindSafe for PromptTask
impl Send for PromptTask
impl Sync for PromptTask
impl Unpin for PromptTask
impl UnsafeUnpin for PromptTask
impl UnwindSafe for PromptTask
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