agentsociety.survey.models¶
Module Contents¶
Classes¶
Represents a survey with metadata and associated pages containing questions. |
API¶
- class agentsociety.survey.models.QuestionType¶
-
- TEXT¶
‘text’
- RADIO¶
‘radiogroup’
- CHECKBOX¶
‘checkbox’
- BOOLEAN¶
‘boolean’
- RATING¶
‘rating’
- MATRIX¶
‘matrix’
- class agentsociety.survey.models.Question¶
Bases:
pydantic.BaseModel- type: agentsociety.survey.models.QuestionType¶
None
- class agentsociety.survey.models.Page¶
Bases:
pydantic.BaseModel- elements: List[agentsociety.survey.models.Question]¶
None
- class agentsociety.survey.models.Survey¶
Bases:
pydantic.BaseModelRepresents a survey with metadata and associated pages containing questions.
- pages: List[agentsociety.survey.models.Page]¶
None
List of pages in the survey
- created_at: datetime.datetime¶
‘Field(…)’
Timestamp of when the survey was created
- to_prompt() List[str]¶
Convert the questionnaire into a list of strings, where each string represents one question.
Description:
Converts the survey into a list of individual question prompts, each containing the survey context and one specific question.
Returns:
List[str]: A list of strings, each representing one question with its context and instructions.