@@ -287,6 +287,25 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a
287
287
->setDisplayConfigurable ('form ' , TRUE )
288
288
->setDisplayConfigurable ('view ' , FALSE );
289
289
290
+ $ fields ['organization ' ] = BaseFieldDefinition::create ('string ' )
291
+ ->setRevisionable (TRUE )
292
+ ->setTranslatable (TRUE )
293
+ ->setLabel (t ('Organization ' ))
294
+ ->setDescription (t ('The organization that developed the model. ' ))
295
+ ->setRequired (TRUE )
296
+ ->setSetting ('max_length ' , 255 )
297
+ ->setDisplayOptions ('form ' , [
298
+ 'type ' => 'string_textfield ' ,
299
+ 'weight ' => -95 ,
300
+ ])
301
+ ->setDisplayConfigurable ('form ' , TRUE )
302
+ ->setDisplayOptions ('view ' , [
303
+ 'label ' => 'inline ' ,
304
+ 'type ' => 'string ' ,
305
+ 'weight ' => -95 ,
306
+ ])
307
+ ->setDisplayConfigurable ('view ' , TRUE );
308
+
290
309
$ fields ['description ' ] = BaseFieldDefinition::create ('string_long ' )
291
310
->setRevisionable (TRUE )
292
311
->setTranslatable (TRUE )
@@ -303,7 +322,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a
303
322
'weight ' => -90 ,
304
323
])
305
324
->setDisplayConfigurable ('view ' , TRUE )
306
- ->setRequired (TRUE );
325
+ ->setRequired (FALSE );
307
326
308
327
$ fields ['version ' ] = BaseFieldDefinition::create ('string ' )
309
328
->setRevisionable (TRUE )
@@ -321,33 +340,14 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a
321
340
'weight ' => -80 ,
322
341
])
323
342
->setDisplayConfigurable ('view ' , TRUE )
324
- ->setRequired (TRUE );
325
-
326
- $ fields ['organization ' ] = BaseFieldDefinition::create ('string ' )
327
- ->setRevisionable (TRUE )
328
- ->setTranslatable (TRUE )
329
- ->setLabel (t ('Organization ' ))
330
- ->setDescription (t ('The organization that developed the model. ' ))
331
- ->setRequired (TRUE )
332
- ->setSetting ('max_length ' , 255 )
333
- ->setDisplayOptions ('form ' , [
334
- 'type ' => 'string_textfield ' ,
335
- 'weight ' => -75 ,
336
- ])
337
- ->setDisplayConfigurable ('form ' , TRUE )
338
- ->setDisplayOptions ('view ' , [
339
- 'label ' => 'inline ' ,
340
- 'type ' => 'string ' ,
341
- 'weight ' => -75 ,
342
- ])
343
- ->setDisplayConfigurable ('view ' , TRUE );
343
+ ->setRequired (FALSE );
344
344
345
345
$ fields ['type ' ] = BaseFieldDefinition::create ('list_string ' )
346
346
->setRevisionable (TRUE )
347
347
->setTranslatable (TRUE )
348
348
->setLabel (t ('Type ' ))
349
349
->setDescription (t ('Type of model, generally its modality. ' ))
350
- ->setRequired (TRUE )
350
+ ->setRequired (FALSE )
351
351
->setSetting ('allowed_values ' , [
352
352
'language ' => t ('Language model ' ),
353
353
'vision ' => t ('Vision model ' ),
@@ -376,7 +376,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a
376
376
->setTranslatable (TRUE )
377
377
->setLabel (t ('Architecture ' ))
378
378
->setDescription (t ('The model \'s architecture. ' ))
379
- ->setRequired (TRUE )
379
+ ->setRequired (FALSE )
380
380
->setSetting ('allowed_values ' , [
381
381
'transformer ' => t ('Transformer ' ),
382
382
'transformer decoder ' => t ('Transformer (Decoder-only) ' ),
@@ -409,7 +409,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a
409
409
->setTranslatable (TRUE )
410
410
->setLabel (t ('Treatment ' ))
411
411
->setDescription (t ('The training treatment, includes pre-training, fine-tuning, RLHF or other training techniques. ' ))
412
- ->setRequired (TRUE )
412
+ ->setRequired (FALSE )
413
413
->setSetting ('allowed_values ' , [
414
414
'pre-trained ' => t ('Pre-trained ' ),
415
415
'instruct fine-tuned ' => t ('Instruct fine-tuned ' ),
@@ -432,7 +432,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a
432
432
->setTranslatable (TRUE )
433
433
->setLabel (t ('Base model ' ))
434
434
->setDescription (t ('The pretrained version of the model which this model is based on, reference itself if this is the pre-trained model. ' ))
435
- ->setRequired (TRUE )
435
+ ->setRequired (FALSE )
436
436
->setSetting ('max_length ' , 255 )
437
437
->setDisplayOptions ('form ' , [
438
438
'type ' => 'string_textfield ' ,
@@ -534,7 +534,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a
534
534
->setRevisionable (TRUE )
535
535
->setTranslatable (TRUE )
536
536
->setDescription (t ('Model status ' ))
537
- ->setRequired (TRUE )
537
+ ->setRequired (FALSE )
538
538
->setDefaultValue (static ::STATUS_UNAPPROVED )
539
539
->setSetting ('allowed_values ' , [
540
540
static ::STATUS_UNAPPROVED => t ('Unapproved ' ),
0 commit comments