Skip to content

Commit 815e76f

Browse files
authored
add default value for description and examples in the API route for models (#1063)
1 parent 8b0abbc commit 815e76f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/routes/api/models/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export async function GET() {
1010
datasetName: model.datasetName,
1111
datasetUrl: model.datasetUrl,
1212
displayName: model.displayName,
13-
description: model.description,
13+
description: model.description ?? "",
1414
logoUrl: model.logoUrl,
15-
promptExamples: model.promptExamples,
15+
promptExamples: model.promptExamples ?? [],
1616
preprompt: model.preprompt,
1717
multimodal: model.multimodal,
1818
unlisted: model.unlisted,

0 commit comments

Comments
 (0)