MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getModelsJSONPath

Function getModelsJSONPath

packages/components/src/modelLoader.ts:12–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10}
11
12const getModelsJSONPath = (): string => {
13 const checkModelsPaths = [path.join(__dirname, '..', 'models.json'), path.join(__dirname, '..', '..', 'models.json')]
14 for (const checkPath of checkModelsPaths) {
15 if (fs.existsSync(checkPath)) {
16 return checkPath
17 }
18 }
19 return ''
20}
21
22const isValidUrl = (urlString: string) => {
23 let url

Callers 1

getRawModelFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected