Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

510 B
Raw Blame
export function documentUploadRepresentationFormat(
  file: Pick<File, "name">,
): string {
  const name = file.name;
  if (!name.includes(".") || name.endsWith(".")) return "binary";
  const extension = name.split(".").at(-1)?.toLowerCase();
  if (!extension) return "binary";
  if (extension === "md" || extension === "markdown") return "markdown";
  if (extension === "txt" || extension === "log") return "plain_text";
  if (extension === "htm" || extension === "html") return "html";
  return extension;
}