agentscope.service.service_response module

Service response module

class agentscope.service.service_response.ServiceResponse(status: ServiceExecStatus, content: Any)[source]

Bases: dict

Used to wrap the execution results of the services

__init__(status: ServiceExecStatus, content: Any)[source]

Constructor of ServiceResponse

Parameters:
  • status (ServiceExeStatus) – The execution status of the service.

  • content (Any) – If the argument`status` is SUCCESS, content is the response. We use object here to support various objects, e.g. str, dict, image, video, etc. Otherwise, content is the error message.