Enum Content Selection
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub enum ContentSelection {
LastMessage,
Message(i64),
Instructions,
SystemPrompt,
LastUserMessage,
Output,
All,
}
Selection applied before extraction. Invalid source/selection pairs are errors.
Variants
LastMessage
LastMessage
Exactly the final supplied request item.
Message(i64)
Message(i64)
Request history index; negative values count from the end.
Instructions
Instructions
Top-level instructions only.
SystemPrompt
SystemPrompt
Instructions, otherwise the first system/developer item.
LastUserMessage
LastUserMessage
Last portable or recognized native user item.
Output
Output
Current response message and separate tool calls.
All
All
All parts of standalone message/content input.
Implementations
impl ContentSelection
impl ContentSelection
select
pub fn select(
self,
source: ContentSource<'_>,
) -> Result<Option<MessageView<'_>>, ContentSelectionError>
Select borrowed normalized content without searching past a selected textless item.
Errors
Returns an error for incompatible sources or an out-of-range explicit index.
Trait Implementations
impl Clone for ContentSelection
impl Clone for ContentSelection
clone
fn clone(&self) -> ContentSelection
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for ContentSelection
impl Debug for ContentSelection
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
impl PartialEq for ContentSelection
impl PartialEq for ContentSelection
eq
fn eq(&self, other: &ContentSelection) -> bool
ne
fn ne(&self, other: &Rhs) -> bool
impl Copy for ContentSelection
impl Copy for ContentSelection
impl Eq for ContentSelection
impl Eq for ContentSelection
impl StructuralPartialEq for ContentSelection
impl StructuralPartialEq for ContentSelection