Spaces:
Sleeping
Sleeping
Kevin CATHALY
commited on
add default value for description and examples in the API route for models (#1063)
Browse files
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,
|