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

Function fetchModelsList

frontend/src/components/playground/index.tsx:465–483  ·  view source on GitHub ↗
(params: Record<string, any>)

Source from the content-addressed store, hash-verified

463 }
464 }
465 const fetchModelsList = async (params: Record<string, any>) => {
466
467 try {
468 const res: any = await getModelsList(params, 'chat_completion')
469 const data = res.data.map((item: any) => {
470 return {
471 ...item,
472 key: item.model_id
473 }
474 })
475 setOptions(data)
476 setHasModelMore(res.has_more)
477 } catch (error) {
478 console.log(error)
479 const apiResponse = error as ApiErrorResponse
480 const message = apiResponse.response.data.error.message
481 toast.error(message)
482 }
483 }
484
485 const handleEditAssistant = async () => {
486 setLoading(true)

Callers 3

initialFunctionFunction · 0.70
handleChildModelEventFunction · 0.70
handleCreateModelIdFunction · 0.70

Calls 1

getModelsListFunction · 0.90

Tested by

no test coverage detected