(params: Record<string, string | number>)
| 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) |
no test coverage detected