MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / fetchModelsList

Function fetchModelsList

frontend/src/components/retrieval/index.tsx:189–206  ·  view source on GitHub ↗
(params: Record<string, any>, type?: string)

Source from the content-addressed store, hash-verified

187 setLoading(false);
188 };
189 const fetchModelsList = async (params: Record<string, any>, type?: string) => {
190 if (type) {
191 dispatch(fetchModelsData(20) as any)
192 }
193 try {
194 const res: any = await getModelsList(params, 'text_embedding')
195 const data = res.data.map((item: any) => {
196 return {
197 ...item,
198 key: item.model_id,
199 }
200 })
201 setModelHasMore(res.has_more)
202 setOptions(data)
203 } catch (error) {
204 console.log(error)
205 }
206 }
207 const handleCreatePrompt = () => {
208 setDrawerTitle('Create Collection')
209 setDrawerName(undefined)

Callers 2

RetrievalFunction · 0.70
handleChildModelEventFunction · 0.70

Calls 2

fetchModelsDataFunction · 0.90
getModelsListFunction · 0.90

Tested by

no test coverage detected