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

Function getSpecificModelFromCategory

packages/components/src/modelLoader.ts:77–88  ·  view source on GitHub ↗
(categoryModels: any, provider: string | undefined, name: string | undefined)

Source from the content-addressed store, hash-verified

75}
76
77const getSpecificModelFromCategory = (categoryModels: any, provider: string | undefined, name: string | undefined) => {
78 for (const cm of categoryModels) {
79 if (cm.models && cm.name.toLowerCase() === provider?.toLowerCase()) {
80 for (const m of cm.models) {
81 if (m.name === name) {
82 return m
83 }
84 }
85 }
86 }
87 return undefined
88}
89
90export const getModels = async (category: MODEL_TYPE, name: string) => {
91 const returnData: INodeOptionsValue[] = []

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected