models only.Expand description
Conversion outcomes for content parts sent to a provider. What happened to each content part on the way to a provider.
Content can express more than any single provider transport accepts, so every adapter
has to decide what to do with the remainder. The decisions themselves are legitimate;
making them invisible is not. Adapters used unrelated fallback policies — drop,
textualize, or encode — with no record, so a request could reach a provider without
material the caller supplied and the model could answer as though it had seen a document
it never received.
Recording an outcome here emits a tracing event at the same moment, so an omission or
downgrade is always observable. ConversionReport::into_error lets a caller that
cannot tolerate loss turn omissions into a failure before dispatch.
§Example
use adk_model::part_conversion::ConversionReport;
let mut report = ConversionReport::new("bedrock");
report.converted("Text");
report.omitted("InlineData", Some("audio/wav"), "no Bedrock Converse block accepts audio");
assert!(report.has_omissions());
assert_eq!(report.omitted_parts().count(), 1);Structs§
- Conversion
Report - Every part outcome for one request conversion.
- Part
Outcome - One part’s fate, with enough detail to act on.
Enums§
- Part
Disposition - What an adapter did with one content part.