aiq.data_models.interactive#
Attributes#
Classes#
Represents the type of an interaction model. |
|
Represents the types of system interaction binary choice content |
|
Represents the types of system interaction multiple choice content |
|
Represents a choice for a binary interaction. |
|
Represents a text response to an interaction. |
|
Represents a notification response to an interaction. |
|
Represents a binary response to an interaction. |
|
Represents a multiple choice radio response to an interaction. |
|
Represents a multiple choice checkbox response to an interaction. |
|
Represents a multiple choice dropdown response to an interaction. |
|
Base interaction model to derive from |
|
Represents a text interaction. |
|
Represents a notification interaction. |
|
Represents a binary interaction. |
|
Represents a multiple choice interaction. |
|
Represents a radio interaction. |
|
Represents a checkbox interaction. |
|
Represents a dropdown interaction. |
|
Represents the status of an interaction. |
|
Represents a system-human interaction. |
|
Represents a system-human interaction with a prompt. |
|
Represents a system-human interaction with a response. |
Module Contents#
- class HumanPromptModelType#
-
Represents the type of an interaction model.
Initialize self. See help(type(self)) for accurate signature.
- TEXT = 'text'#
- NOTIFICATION = 'notification'#
- BINARY_CHOICE = 'binary_choice'#
- RADIO = 'radio'#
- CHECKBOX = 'checkbox'#
- DROPDOWN = 'dropdown'#
- class BinaryChoiceOptionsType#
-
Represents the types of system interaction binary choice content
Initialize self. See help(type(self)) for accurate signature.
- CONTINUE = 'continue'#
- CANCEL = 'cancel'#
- class MultipleChoiceOptionType#
-
Represents the types of system interaction multiple choice content
Initialize self. See help(type(self)) for accurate signature.
- EMAIL = 'email'#
- SMS = 'sms'#
- PUSH = 'push'#
- class BinaryHumanPromptOption(/, **data: Any)#
Bases:
pydantic.BaseModel
Represents a choice for a binary interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- value: Any = None#
- class MultipleChoiceOption(/, **data: Any)#
Bases:
pydantic.BaseModel
- class HumanResponseText(/, **data: Any)#
Bases:
pydantic.BaseModel
Represents a text response to an interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- type: Literal[HumanPromptModelType]#
- class HumanResponseNotification(/, **data: Any)#
Bases:
pydantic.BaseModel
Represents a notification response to an interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- type: Literal[HumanPromptModelType]#
- class HumanResponseBinary(/, **data: Any)#
Bases:
pydantic.BaseModel
Represents a binary response to an interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- type: Literal[HumanPromptModelType]#
- selected_option: BinaryHumanPromptOption = None#
- class HumanResponseRadio(/, **data: Any)#
Bases:
pydantic.BaseModel
Represents a multiple choice radio response to an interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- type: Literal[HumanPromptModelType]#
- selected_option: MultipleChoiceOption = None#
- class HumanResponseCheckbox(/, **data: Any)#
Bases:
pydantic.BaseModel
Represents a multiple choice checkbox response to an interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- type: Literal[HumanPromptModelType]#
- selected_option: MultipleChoiceOption = None#
- class HumanResponseDropdown(/, **data: Any)#
Bases:
pydantic.BaseModel
Represents a multiple choice dropdown response to an interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- type: Literal[HumanPromptModelType]#
- selected_option: MultipleChoiceOption = None#
- HumanResponse#
- class HumanPromptBase(/, **data: Any)#
Bases:
pydantic.BaseModel
Base interaction model to derive from
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.
- class HumanPromptText(/, **data: Any)#
Bases:
HumanPromptBase
Represents a text interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- input_type: Literal[HumanPromptModelType]#
- class HumanPromptNotification(/, **data: Any)#
Bases:
HumanPromptBase
Represents a notification interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- input_type: Literal[HumanPromptModelType]#
- class HumanPromptBinary(/, **data: Any)#
Bases:
HumanPromptBase
Represents a binary interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- input_type: Literal[HumanPromptModelType]#
- options: list[BinaryHumanPromptOption] = None#
- classmethod validate_options(options)#
- class HumanPromptMultipleChoiceBase(/, **data: Any)#
Bases:
HumanPromptBase
Represents a multiple choice interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- options: list[MultipleChoiceOption] = None#
- class HumanPromptRadio(/, **data: Any)#
Bases:
HumanPromptMultipleChoiceBase
Represents a radio interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- input_type: Literal[HumanPromptModelType]#
- class HumanPromptCheckbox(/, **data: Any)#
Bases:
HumanPromptMultipleChoiceBase
Represents a checkbox interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- input_type: Literal[HumanPromptModelType]#
- class HumanPromptDropdown(/, **data: Any)#
Bases:
HumanPromptMultipleChoiceBase
Represents a dropdown interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- input_type: Literal[HumanPromptModelType]#
- HumanPrompt#
- class InteractionStatus#
-
Represents the status of an interaction.
Initialize self. See help(type(self)) for accurate signature.
- PENDING = 'pending'#
- IN_PROGRESS = 'in_progress'#
- COMPLETED = 'completed'#
- FAILED = 'failed'#
- class InteractionBase(/, **data: Any)#
Bases:
pydantic.BaseModel
Represents a system-human interaction.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- status: InteractionStatus = None#
- classmethod validate_timestamp(timestamp)#
- class InteractionPrompt(/, **data: Any)#
Bases:
InteractionBase
Represents a system-human interaction with a prompt.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- content: HumanPrompt = None#
- class InteractionResponse(/, **data: Any)#
Bases:
InteractionBase
Represents a system-human interaction with a response.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- content: HumanResponse = None#