Skip to content

Commit

Permalink
chore: 解析自定义模型时兼容模型名称为空的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
coulsontl committed Nov 10, 2024
1 parent 7f12bb8 commit fba9726
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils/parseModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export const parseModelString = (modelString: string = '', withDeploymentName =
continue;
}

// remove empty model name
if (!item.trim().length) {
continue;
}

// Remove duplicate model entries.
const existingIndex = models.findIndex(({ id: n }) => n === id);
if (existingIndex !== -1) {
Expand Down

0 comments on commit fba9726

Please sign in to comment.