pub struct ConversationResponse {
pub chat_uid: String,
pub message_id: String,
pub status: ConversationStatus,
pub answer: String,
pub references: Option<Vec<Reference>>,
pub further_questions: Option<Vec<String>>,
pub elapsed_time: f64,
pub interrupt: Option<Interrupt>,
pub error: Option<AgentError>,
}Expand description
Response for crate::AgentContext::conversation,
crate::AgentContext::continue_conversation, and the final result of the
streamed counterparts
Fields§
§chat_uid: StringConversation identifier, used for follow-up questions and troubleshooting
message_id: StringMessage ID of this round (as a string). Accepts a raw JSON number too,
defensively — see ChatStartedPayload::message_id.
status: ConversationStatusFinal run status
answer: StringFinal answer text; valid when status is succeeded
references: Option<Vec<Reference>>Sources referenced by the answer
further_questions: Option<Vec<String>>Suggested follow-up questions (“you might also ask”); present when the run produced them
elapsed_time: f64Run duration in seconds
interrupt: Option<Interrupt>Present only when status is interrupted
error: Option<AgentError>Present only when the run failed
Trait Implementations§
Source§impl Clone for ConversationResponse
impl Clone for ConversationResponse
Source§fn clone(&self) -> ConversationResponse
fn clone(&self) -> ConversationResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConversationResponse
impl Debug for ConversationResponse
Source§impl<'de> Deserialize<'de> for ConversationResponse
impl<'de> Deserialize<'de> for ConversationResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConversationResponse
impl RefUnwindSafe for ConversationResponse
impl Send for ConversationResponse
impl Sync for ConversationResponse
impl Unpin for ConversationResponse
impl UnsafeUnpin for ConversationResponse
impl UnwindSafe for ConversationResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more