Skip to content

Commit 22e2f49

Browse files
authored
Generic fixes (#1667)
1 parent fd56311 commit 22e2f49

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

cli/cmd/lib_realtime_apis.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,17 @@ func parseAPITFLiveReloadingSummary(summary *schema.APITFLiveReloadingSummary) (
476476
}
477477
}
478478

479-
_, usesCortexDefaultModelName := summary.ModelMetadata[consts.SingleModelName]
479+
usesCortexDefaultModelName := false
480+
for modelID := range summary.ModelMetadata {
481+
modelName, _, err := getModelFromModelID(modelID)
482+
if err != nil {
483+
return "", err
484+
}
485+
if modelName == consts.SingleModelName {
486+
usesCortexDefaultModelName = true
487+
break
488+
}
489+
}
480490

481491
t := table.Table{
482492
Headers: []table.Header{

cli/cmd/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ var _logsCmd = &cobra.Command{
8989
gcpReq.URL.RawQuery = queryValues.Encode()
9090

9191
gcpLogsURL := gcpReq.URL.String()
92-
consoleOutput := console.Bold(fmt.Sprintf("api %s logs: ", apiName)) + gcpLogsURL
92+
consoleOutput := console.Bold(fmt.Sprintf("visit the following link to view logs for api %s: ", apiName)) + gcpLogsURL
9393
fmt.Println(consoleOutput)
9494
}
9595

pkg/types/spec/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func validateDirModels(modelPath string, api userconfig.API, projectDir string,
158158
modelNames := []string{}
159159
modelDirPathLength := len(slices.RemoveEmpties(strings.Split(dirPrefix, "/")))
160160
for _, path := range modelDirPaths {
161-
splitPath := strings.Split(path, "/")
161+
splitPath := slices.RemoveEmpties(strings.Split(path, "/"))
162162
modelNames = append(modelNames, splitPath[modelDirPathLength])
163163
}
164164
modelNames = slices.UniqueStrings(modelNames)

0 commit comments

Comments
 (0)