#[non_exhaustive]pub struct GroundingFact {
pub fact_text: String,
pub attributes: HashMap<String, String>,
/* private fields */
}Available on crate feature
grounded-generation-service only.Expand description
Grounding Fact.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fact_text: StringText content of the fact. Can be at most 10K characters long.
attributes: HashMap<String, String>Attributes associated with the fact.
Common attributes include source (indicating where the fact was sourced
from), author (indicating the author of the fact), and so on.
Implementations§
Source§impl GroundingFact
impl GroundingFact
pub fn new() -> Self
Sourcepub fn set_fact_text<T: Into<String>>(self, v: T) -> Self
pub fn set_fact_text<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_attributes<T, K, V>(self, v: T) -> Self
pub fn set_attributes<T, K, V>(self, v: T) -> Self
Sets the value of attributes.
§Example
ⓘ
let x = GroundingFact::new().set_attributes([
("key0", "abc"),
("key1", "xyz"),
]);Trait Implementations§
Source§impl Clone for GroundingFact
impl Clone for GroundingFact
Source§fn clone(&self) -> GroundingFact
fn clone(&self) -> GroundingFact
Returns a duplicate of the value. Read more
1.0.0 · 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 GroundingFact
impl Debug for GroundingFact
Source§impl Default for GroundingFact
impl Default for GroundingFact
Source§fn default() -> GroundingFact
fn default() -> GroundingFact
Returns the “default value” for a type. Read more
Source§impl Message for GroundingFact
impl Message for GroundingFact
Source§impl PartialEq for GroundingFact
impl PartialEq for GroundingFact
impl StructuralPartialEq for GroundingFact
Auto Trait Implementations§
impl Freeze for GroundingFact
impl RefUnwindSafe for GroundingFact
impl Send for GroundingFact
impl Sync for GroundingFact
impl Unpin for GroundingFact
impl UnwindSafe for GroundingFact
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