MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / getFilePaths

Function getFilePaths

component/model.go:607–618  ·  view source on GitHub ↗
(namespace, repoName, folder string, repoType types.RepositoryType, gsTree func(ctx context.Context, req gitserver.GetRepoInfoByPathReq) ([]*types.File, error))

Source from the content-addressed store, hash-verified

605}
606
607func getFilePaths(namespace, repoName, folder string, repoType types.RepositoryType, gsTree func(ctx context.Context, req gitserver.GetRepoInfoByPathReq) ([]*types.File, error)) ([]string, error) {
608 var filePaths []string
609 allFiles, err := getAllFiles(namespace, repoName, folder, repoType, gsTree)
610 if err != nil {
611 return nil, err
612 }
613 for _, f := range allFiles {
614 filePaths = append(filePaths, f.Path)
615 }
616
617 return filePaths, nil
618}
619
620func (c *ModelComponent) Predict(ctx context.Context, req *types.ModelPredictReq) (*types.ModelPredictResp, error) {
621 mid := inference.ModelID{

Callers 3

SDKModelInfoMethod · 0.70
SDKListFilesMethod · 0.70
calcQualityScoreMethod · 0.70

Calls 1

getAllFilesFunction · 0.85

Tested by

no test coverage detected