Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

LabModelParam

Lab model param spec. When used, the end user will be able to select a lab from the list of labs available in the system. The config stores only the lab model id.

The accessible value in task is a LabDTOWithCredentials containing the lab info and its resolved credentials data.

Attributes
PRIVATE_VISIBILITY: LiteralPROTECTED_VISIBILITY: LiteralPUBLIC_VISIBILITY: Literaladditional_info: dict | Noneai_catalog_member: booldefault_value: Optionalhuman_name: str | Noneinvalid_reason: str | Noneis_valid: booloptional: boolshort_description: str | Nonevisibility: Literal
Functions
__init__
optional : bool - False
See default value
visibility : Literal - public
Visibility of the param, see doc on type ParamSpecVisibilty for more info
human_name : str | None
Human readable name of the param, showed in the interface
short_description : str | None
Description of the param, showed in the interface
build

Retrieve the LabModel by id and return its DTO with credentials.

value : Any
Return type : gws_core.lab.lab_model.lab_dto.LabDTOWithCredentials | None
get_default_value
Return type : Any
to_dto
Return type : ParamSpecDTO
to_simple_dto
Return type : ParamSpecSimpleDTO
validate

Extract the id from LabModel, dict, or string.

value : Any
Return type : str | None
ai_additional_info_doc @classmethod

Maps this type's AI-relevant additional_info constraint keys to a human explanation. Default: none. Override on types that expose constraints (min/max, lengths, multiple, ...).

Return type : dict
ai_example_spec @classmethod

A representative, valid instance of this type used as the example in :meth:describe_for_ai. Override to show meaningful constraints (e.g. min/max). The default is a bare instance with a human_name.

Return type : ParamSpec
ai_summary @classmethod

One-line description of what this field type is for. Override per type.

Return type : str
describe_for_ai @classmethod

Self-describe this param type for an AI form-builder.

Returns the type tag, a one-line summary, the meaning of each AI-relevant additional_info key, and a real example spec serialized exactly as ConfigSpecs.from_json expects. Built from :meth:ai_example_spec / :meth:ai_summary / :meth:ai_additional_info_doc so a type only overrides the small pieces it cares about. Keeping this on the type (not in the AI service) means a new param type ships its own catalog entry.

example_key : str - example_field
Return type : ParamSpecAiDescriptionDTO
empty @classmethod
Return type : Self
get_category @classmethod

The :class:ParamSpecCategory this type was registered with by the @param_spec_decorator. None if the class was never decorated.

Return type : gws_core.config.param.param_spec_decorator.ParamSpecCategory | None
get_param_spec_type @classmethod
Return type : ParamSpecType
load_from_dto @classmethod
spec_dto : ParamSpecDTO
validate : bool - False
Return type : Self
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.