agentsociety.webapi.api.agent

Module Contents

Classes

Functions

get_agent_dialog_by_exp_id_and_agent_id

Get dialog by experiment ID and agent ID

list_agent_profile_by_exp_id

List agent profile by experiment ID

get_agent_profile_by_exp_id_and_agent_id

Get agent profile by experiment ID and agent ID

list_agent_status_by_day_and_t

List agent status by experiment ID, day and time

get_agent_status_by_exp_id_and_agent_id

Get agent status by experiment ID and agent ID

get_agent_survey_by_exp_id_and_agent_id

Get survey by experiment ID and agent ID

get_global_prompt_by_day_t

Get global prompt by experiment ID, day and time

post_agent_dialog

Send dialog to agent by experiment ID and agent ID

post_agent_survey

Send survey to agent by experiment ID and agent ID

Data

API

agentsociety.webapi.api.agent.__all__

[‘router’]

agentsociety.webapi.api.agent.router

‘APIRouter(…)’

async agentsociety.webapi.api.agent.get_agent_dialog_by_exp_id_and_agent_id(request: fastapi.Request, exp_id: uuid.UUID, agent_id: int) agentsociety.webapi.models.ApiResponseWrapper[List[agentsociety.webapi.models.agent.ApiAgentDialog]]

Get dialog by experiment ID and agent ID

async agentsociety.webapi.api.agent.list_agent_profile_by_exp_id(request: fastapi.Request, exp_id: uuid.UUID) agentsociety.webapi.models.ApiResponseWrapper[List[agentsociety.webapi.models.agent.ApiAgentProfile]]

List agent profile by experiment ID

async agentsociety.webapi.api.agent.get_agent_profile_by_exp_id_and_agent_id(request: fastapi.Request, exp_id: uuid.UUID, agent_id: int) agentsociety.webapi.models.ApiResponseWrapper[agentsociety.webapi.models.agent.ApiAgentProfile]

Get agent profile by experiment ID and agent ID

async agentsociety.webapi.api.agent.list_agent_status_by_day_and_t(request: fastapi.Request, exp_id: uuid.UUID, day: Optional[int] = Query(None, description='the day for getting agent status'), t: Optional[float] = Query(None, description='the time for getting agent status')) agentsociety.webapi.models.ApiResponseWrapper[List[agentsociety.webapi.models.agent.ApiAgentStatus]]

List agent status by experiment ID, day and time

async agentsociety.webapi.api.agent.get_agent_status_by_exp_id_and_agent_id(request: fastapi.Request, exp_id: uuid.UUID, agent_id: int) agentsociety.webapi.models.ApiResponseWrapper[List[agentsociety.webapi.models.agent.ApiAgentStatus]]

Get agent status by experiment ID and agent ID

async agentsociety.webapi.api.agent.get_agent_survey_by_exp_id_and_agent_id(request: fastapi.Request, exp_id: uuid.UUID, agent_id: int) agentsociety.webapi.models.ApiResponseWrapper[List[agentsociety.webapi.models.agent.ApiAgentSurvey]]

Get survey by experiment ID and agent ID

async agentsociety.webapi.api.agent.get_global_prompt_by_day_t(request: fastapi.Request, exp_id: uuid.UUID, day: Optional[int] = Query(None, description='the day for getting agent status'), t: Optional[float] = Query(None, description='the time for getting agent status')) agentsociety.webapi.models.ApiResponseWrapper[Optional[agentsociety.webapi.models.agent.ApiGlobalPrompt]]

Get global prompt by experiment ID, day and time

class agentsociety.webapi.api.agent.AgentChatMessage

Bases: pydantic.BaseModel

content: str

None

day: int

None

t: float

None

async agentsociety.webapi.api.agent.post_agent_dialog(request: fastapi.Request, exp_id: uuid.UUID, agent_id: int, message: agentsociety.webapi.api.agent.AgentChatMessage = Body(...)) agentsociety.webapi.models.ApiResponseWrapper[None]

Send dialog to agent by experiment ID and agent ID

class agentsociety.webapi.api.agent.AgentSurveyMessage

Bases: pydantic.BaseModel

survey_id: uuid.UUID

None

day: int

None

t: float

None

async agentsociety.webapi.api.agent.post_agent_survey(request: fastapi.Request, exp_id: uuid.UUID, agent_id: int, message: agentsociety.webapi.api.agent.AgentSurveyMessage = Body(...)) agentsociety.webapi.models.ApiResponseWrapper[None]

Send survey to agent by experiment ID and agent ID