agentscope.exception

AgentScope exception classes.

exception agentscope.exception.ResponseParsingError(message: str, raw_response: str | None = None)[源代码]

基类:Exception

The exception class for response parsing error with uncertain reasons.

__init__(message: str, raw_response: str | None = None) None[源代码]

Initialize the exception with the message.

raw_response: str

Record the raw response.

exception agentscope.exception.JsonParsingError(message: str, raw_response: str | None = None)[源代码]

基类:ResponseParsingError

The exception class for JSON parsing error.

exception agentscope.exception.JsonTypeError(message: str, raw_response: str | None = None)[源代码]

基类:ResponseParsingError

The exception class for JSON type error.

exception agentscope.exception.RequiredFieldNotFoundError(message: str, raw_response: str | None = None)[源代码]

基类:ResponseParsingError

The exception class for missing required field in model response, when the response is required to be a JSON dict object with required fields.

exception agentscope.exception.TagNotFoundError(message: str, raw_response: str | None = None, missing_begin_tag: bool = True, missing_end_tag: bool = True)[源代码]

基类:ResponseParsingError

The exception class for missing tagged content in model response.

__init__(message: str, raw_response: str | None = None, missing_begin_tag: bool = True, missing_end_tag: bool = True)[源代码]

Initialize the exception with the message.

参数:
  • raw_response (str) – Record the raw response from the model.

  • missing_begin_tag (bool, defaults to True) – If the response misses the beginning tag, default to True.

  • missing_end_tag (bool, defaults to True) – If the response misses the end tag, default to True.

missing_begin_tag: bool

If the response misses the begin tag.

missing_end_tag: bool

If the response misses the end tag.

exception agentscope.exception.FunctionCallError(message: str)[源代码]

基类:Exception

The base class for exception raising during calling functions.

__init__(message: str) None[源代码]
exception agentscope.exception.FunctionCallFormatError(message: str)[源代码]

基类:FunctionCallError

The exception class for function calling format error.

exception agentscope.exception.FunctionNotFoundError(message: str)[源代码]

基类:FunctionCallError

The exception class for function not found error.

exception agentscope.exception.ArgumentNotFoundError(message: str)[源代码]

基类:FunctionCallError

The exception class for missing argument error.

exception agentscope.exception.ArgumentTypeError(message: str)[源代码]

基类:FunctionCallError

The exception class for argument type error.