File size: 273 Bytes
033ca06
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import { getBackendBaseURL } from "../config";

import type { Model } from "./types";

export async function loadModels() {
  const res = fetch(`${getBackendBaseURL()}/api/models`);
  const { models } = (await (await res).json()) as { models: Model[] };
  return models;
}