MCPcopy Create free account
hub / github.com/TaskingAI/TaskingAI / fetchData

Function fetchData

frontend/src/components/retrieval/index.tsx:170–188  ·  view source on GitHub ↗
(params: Record<string, string | number>)

Source from the content-addressed store, hash-verified

168 setModalTableOpen(false)
169 }
170 const fetchData = async (params: Record<string, string | number>) => {
171 setLoading(true);
172 try {
173 const res: any = await getRetrievalList(params)
174 const data = res.data.map((item: any) => {
175 return {
176 ...item,
177 capacity1: item.num_chunks + '/' + item.capacity,
178 key: item.collection_id,
179 }
180 })
181 setPromptList(data);
182 setHasMore(res.has_more)
183
184 } catch (error) {
185 console.log(error)
186 }
187 setLoading(false);
188 };
189 const fetchModelsList = async (params: Record<string, any>, type?: string) => {
190 if (type) {
191 dispatch(fetchModelsData(20) as any)

Callers 2

handleChildEventFunction · 0.70
RetrievalFunction · 0.70

Calls 2

getRetrievalListFunction · 0.90
setLoadingFunction · 0.85

Tested by

no test coverage detected