#[non_exhaustive]pub enum Outcome {
Replied {
context_id: Option<String>,
text: String,
files: Vec<Attachment>,
},
Finished {
task_id: String,
context_id: Option<String>,
text: String,
files: Vec<Attachment>,
},
Working {
task_id: String,
context_id: Option<String>,
text: String,
files: Vec<Attachment>,
why: StillWorking,
},
NeedsInput {
task_id: String,
context_id: Option<String>,
text: String,
files: Vec<Attachment>,
},
NeedsAuthorization {
task_id: String,
context_id: Option<String>,
text: String,
files: Vec<Attachment>,
},
Failed {
task_id: String,
context_id: Option<String>,
text: String,
files: Vec<Attachment>,
how: Failure,
},
}Expand description
What came back.
text is what the agent said, already framed as its own words and cut
to the peer’s output cap; empty when it said nothing. files are the
files it returned with what it said, in the order it gave them; a file it
named by URL stays a URL, in the text.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Replied
Answered with a message and started no task.
Finished
The task finished.
Working
The task is still running when the wait ended; waiting again later picks it up.
NeedsInput
The agent asked something; the next message answers it.
NeedsAuthorization
The agent needs an authorization this conversation cannot give.
Failed
The task ended without doing the work.
Trait Implementations§
impl Eq for Outcome
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
impl UnwindSafe for Outcome
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