agentsociety.webapi.models.agent

Module Contents

Classes

AgentDialogType

Agent dialog type

ApiAgentProfile

Agent profile model for API

ApiAgentStatus

Agent status model for API

ApiAgentSurvey

Agent survey model for API

ApiAgentDialog

Agent dialog model for API

ApiGlobalPrompt

Global prompt model for API

Data

API

agentsociety.webapi.models.agent.__all__

[‘agent_dialog’, ‘agent_profile’, ‘agent_status’, ‘agent_survey’, ‘global_prompt’, ‘pending_dialog’,…

class agentsociety.webapi.models.agent.AgentDialogType

Bases: enum.IntEnum

Agent dialog type

Initialization

Initialize self. See help(type(self)) for accurate signature.

Thought

0

Talk

1

User

2

class agentsociety.webapi.models.agent.ApiAgentProfile

Bases: pydantic.BaseModel

Agent profile model for API

id: int

None

Agent ID

name: str

None

Agent name

profile: Any

None

Agent profile (any JSON object)

class Config
from_attributes

True

class agentsociety.webapi.models.agent.ApiAgentStatus

Bases: pydantic.BaseModel

Agent status model for API

id: int

None

Agent ID

day: int

None

Day

t: float

None

Time (second)

lng: Optional[float]

None

Longitude

lat: Optional[float]

None

Latitude

parent_id: Optional[int]

None

Parent agent ID

action: str

None

Action

status: Any

None

Status (any JSON object)

created_at: pydantic.AwareDatetime

None

Created time

class Config
from_attributes

True

class agentsociety.webapi.models.agent.ApiAgentSurvey

Bases: pydantic.BaseModel

Agent survey model for API

id: int

None

Agent ID

day: int

None

Day

t: float

None

Time (second)

survey_id: uuid.UUID

None

Survey ID

result: Any

None

Survey result (any JSON object)

created_at: pydantic.AwareDatetime

None

Created time

class Config
from_attributes

True

class agentsociety.webapi.models.agent.ApiAgentDialog

Bases: pydantic.BaseModel

Agent dialog model for API

id: int

None

Agent ID

day: int

None

Day

t: float

None

Time (second)

type: agentsociety.webapi.models.agent.AgentDialogType

None

Dialog type

speaker: str

None

Speaker

content: str

None

Content

created_at: pydantic.AwareDatetime

None

Created time

class Config
from_attributes

True

class agentsociety.webapi.models.agent.ApiGlobalPrompt

Bases: pydantic.BaseModel

Global prompt model for API

day: int

None

Day

t: float

None

Time (second)

prompt: str

None

Prompt

created_at: pydantic.AwareDatetime

None

Created time

class Config
from_attributes

True