Skip to main content

FileCitation

Struct FileCitation 

Source
pub struct FileCitation {
Show 20 fields pub citation_id: Option<String>, pub index: Option<u32>, pub document_id: String, pub document_name: String, pub document_title: Option<String>, pub source: Option<String>, pub quote: String, pub char_start: Option<i64>, pub char_end: Option<i64>, pub chunk_id: Option<String>, pub chunk_preview: Option<String>, pub chunk_content: Option<String>, pub chunk_type: String, pub page: Option<i32>, pub timestamp: Option<f64>, pub highlights: Vec<Value>, pub reference_type: Option<String>, pub text_positions: Vec<u32>, pub text_position_anchors: Vec<TextPositionAnchor>, pub meta: Option<Value>,
}
Expand description

A citation into a retrieved document, attached to a text message part.

Supplied by the backend plugin and stored verbatim — Chat Engine does not generate or interpret citations. index matches a [N] marker in the part text (1-indexed), sharing one namespace with LinkCitation.

Fields§

§citation_id: Option<String>

Plugin-assigned id, unique per message.

§index: Option<u32>

Matches the [N] token in the part text (1-indexed).

§document_id: String

Source document id.

§document_name: String

Source document name.

§document_title: Option<String>

Human-readable document title, when known.

§source: Option<String>

Document source / venue, when known.

§quote: String

Quoted text from the document.

§char_start: Option<i64>

Zero-indexed start offset into the source plain text.

§char_end: Option<i64>

Exclusive end offset into the source plain text.

§chunk_id: Option<String>

Source chunk identifier.

§chunk_preview: Option<String>

First ~200 chars of the chunk, for hover.

§chunk_content: Option<String>

Full chunk body (text) or image URL (when chunk_type = "image").

§chunk_type: String

Content type of the cited chunk: "text" (default) or "image".

§page: Option<i32>

Source page number (1-indexed), when applicable.

§timestamp: Option<f64>

Video timestamp in seconds, when applicable.

§highlights: Vec<Value>

Highlighted spans within the cited chunk (plugin-defined shape).

§reference_type: Option<String>

direct_quote / paraphrase / data_reference / methodology_reference.

§text_positions: Vec<u32>

Character offsets in the part text where this citation’s [index] marker appears. Pre-computed by the plugin; the engine forwards them verbatim.

§text_position_anchors: Vec<TextPositionAnchor>

Per-marker source anchors, parallel to text_positions.

§meta: Option<Value>

Opaque plugin metadata; forwarded but not interpreted.

Trait Implementations§

Source§

impl Clone for FileCitation

Source§

fn clone(&self) -> FileCitation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FileCitation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FileCitation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for FileCitation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.