pub struct SearchResponse {
pub results: Vec<PostResponse>,
pub mode_used: SearchMode,
pub degraded: bool,
}Expand description
Response from the search tool/endpoint.
results reuses PostResponse rather than a bespoke search-result
type — see the note above ContentResponse.
Fields§
§results: Vec<PostResponse>§mode_used: SearchModeWhich mode actually produced results. Matches the requested
mode unless degraded is true.
degraded: booltrue when semantic was requested but the server could not run
it — the embedding backend was unavailable, timed out, or
errored — and fell back to keyword instead. results and
mode_used reflect what actually ran: the search was downgraded,
not refused. Retrying later may recover semantic mode; passing
mode="keyword" explicitly gets the same results without the
fallback note.
Trait Implementations§
Source§impl Debug for SearchResponse
impl Debug for SearchResponse
Source§impl<'de> Deserialize<'de> for SearchResponse
impl<'de> Deserialize<'de> for SearchResponse
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 SearchResponse
impl RefUnwindSafe for SearchResponse
impl Send for SearchResponse
impl Sync for SearchResponse
impl Unpin for SearchResponse
impl UnsafeUnpin for SearchResponse
impl UnwindSafe for SearchResponse
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