Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

432 B
Raw Blame
const MAPPED_MEDIA_LABELS: Record<string, string> = {
  "application/msword": "DOC",
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
    "DOCX",
  "application/vnd.ms-excel": "XLS",
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
};

export function getMappedMediaLabel(contentType: string): string | undefined {
  return MAPPED_MEDIA_LABELS[contentType.toLowerCase()];
}