File size: 422 Bytes
f778c12
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import type { RunMediaUnderstandingFileResult } from "../../media-understanding/runtime-types.js";

export function isMissingMediaUnderstandingProvider(
  result: RunMediaUnderstandingFileResult,
): boolean {
  const decision = result.decision;
  return (
    decision?.outcome === "skipped" &&
    decision.attachments.length > 0 &&
    decision.attachments.every((attachment) => attachment.attempts.length === 0)
  );
}