agentscope.service.service_response module

Service response module

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

基类:dict

Used to wrap the execution results of the services

__init__(status: ServiceExecStatus, content: Any)[源代码]

Constructor of ServiceResponse

参数:
  • 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.