Kevin CATHALY commited on
Commit
815e76f
1 Parent(s): 8b0abbc

add default value for description and examples in the API route for models (#1063)

Browse files
Files changed (1) hide show
  1. src/routes/api/models/+server.ts +2 -2
src/routes/api/models/+server.ts CHANGED
@@ -10,9 +10,9 @@ export async function GET() {
10
  datasetName: model.datasetName,
11
  datasetUrl: model.datasetUrl,
12
  displayName: model.displayName,
13
- description: model.description,
14
  logoUrl: model.logoUrl,
15
- promptExamples: model.promptExamples,
16
  preprompt: model.preprompt,
17
  multimodal: model.multimodal,
18
  unlisted: model.unlisted,
 
10
  datasetName: model.datasetName,
11
  datasetUrl: model.datasetUrl,
12
  displayName: model.displayName,
13
+ description: model.description ?? "",
14
  logoUrl: model.logoUrl,
15
+ promptExamples: model.promptExamples ?? [],
16
  preprompt: model.preprompt,
17
  multimodal: model.multimodal,
18
  unlisted: model.unlisted,