Back to bricks list
Introduction
Technical Documentation
Other Classes
OpenAiChat OpenAiChatParam
Version

OpenAiChatParam

Special param for config that create a chat with open ai similar to ChatGPT.

The value of this param will be a OpenAiChat object.

:param ParamSpec: description :type ParamSpec: type

Attributes

PRIVATE_VISIBILITY: LiteralPROTECTED_VISIBILITY: LiteralPUBLIC_VISIBILITY: Literaladditional_info: Optionalallowed_values: Optionalcontext: Optionaldefault_value: Optionalhuman_name: Optionaloptional: boolshort_description: Optionalunit: Optionalvisibility: Literal

Functions

__INIT__
Parameters:
NameTypeDefault valueDescription
contextOptional Context of the chat, can also be provided during run str
optionalbool False See default value optional[str]
visibilityLiteral public Visibility of the param, see doc on type paramspecvisibilty for more info paramspecvisibilty
human_nameOptional Enter your prompt/message Human readable name of the param, showed in the interface [str]
short_descriptionOptional Description of the param, showed in the interface [str]
BUILD

Method call before the value is used (in task or view) to apply some transformation if needed by the ParamSpec. This does not affect the value in the database.

Parameters:
NameTypeDefault valueDescription
valueAny
Return type:
Any
GET_DEFAULT_VALUE
Return type:
ParamSpecType
TO_DTO
Return type:
ParamSpecDTO
VALIDATE

Validate the value of the param and return the modified value if needed. This method is called when the param is set in the config before saving it in the database. The returned value must be serializable in json.l

Parameters:
NameTypeDefault valueDescription
valueAny
Return type:
Any
EMPTY - @classmethod
Return type:
ParamSpec
GET_STR_TYPE - @classmethod
Return type:
str
LOAD_FROM_DTO - @classmethod
Parameters:
NameTypeDefault valueDescription
spec_dtoParamSpecDTO
Return type:
ParamSpec