MCPcopy Create free account
hub / github.com/6174/comflowyspace / ApiRouteGetModels

Function ApiRouteGetModels

apps/node/src/routes/api/models.ts:15–38  ·  view source on GitHub ↗
(req: Request, res: Response)

Source from the content-addressed store, hash-verified

13 * @param res
14 */
15export async function ApiRouteGetModels(req: Request, res: Response) {
16 try {
17 const installedModels = await modelManager.getAllInstalledModels();
18 const marketModels = await modelManager.getAllUninstalledModels();
19 const modelMetas = await modelManager.getModelMetas();
20 const paths = getFolderNamesAndPaths();
21 res.send({
22 success: true,
23 data: {
24 installedModels,
25 marketModels,
26 modelMetas,
27 modelPath: paths.MODELS_DIR,
28 paths
29 }
30 });
31 } catch (err) {
32 res.send({
33 success: false,
34 error: err
35 })
36 }
37
38}
39import * as fs from "fs";
40import { getCivitModelByHash, getCivitModelById, listCivitModels } from '../../modules/model-manager/civitai';
41

Callers

nothing calls this directly

Calls 1

getFolderNamesAndPathsFunction · 0.90

Tested by

no test coverage detected