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

Function api_create

backend/app/routes/auto/model.py:102–120  ·  view source on GitHub ↗
(
        request: Request,
        data: ModelCreateRequest,
        path_params: Dict = Depends(path_params_required),
        auth_info: Dict = Depends(auth_info_required),
    )

Source from the content-addressed store, hash-verified

100 responses={422: {"description": "Unprocessable Entity"}},
101 )
102 async def api_create(
103 request: Request,
104 data: ModelCreateRequest,
105 path_params: Dict = Depends(path_params_required),
106 auth_info: Dict = Depends(auth_info_required),
107 ):
108 check_path_params(
109 model_operator=ops,
110 object_id_required=False,
111 path_params=path_params,
112 )
113
114 entity = await ops.create(
115 create_dict=data.model_dump(),
116 **path_params,
117 )
118 return ModelCreateResponse(
119 data=entity.to_response_dict(),
120 )
121
122 @router.post(
123 path="/models/{model_id}",

Callers

nothing calls this directly

Calls 5

check_path_paramsFunction · 0.85
ModelCreateResponseClass · 0.85
createMethod · 0.45
model_dumpMethod · 0.45
to_response_dictMethod · 0.45

Tested by

no test coverage detected