agentscope.exception module
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)[源代码]
-
The exception class for JSON parsing error.
- exception agentscope.exception.JsonDictValidationError(message: str, raw_response: str | None = None)[源代码]
-
The exception class for JSON dict validation error.
- exception agentscope.exception.JsonTypeError(message: str, raw_response: str | None = None)[源代码]
-
The exception class for JSON type error.
- exception agentscope.exception.RequiredFieldNotFoundError(message: str, raw_response: str | None = None)[源代码]
-
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)[源代码]
-
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.
- exception agentscope.exception.FunctionCallFormatError(message: str)[源代码]
-
The exception class for function calling format error.
- exception agentscope.exception.FunctionNotFoundError(message: str)[源代码]
-
The exception class for function not found error.
- exception agentscope.exception.ArgumentNotFoundError(message: str)[源代码]
-
The exception class for missing argument error.
- exception agentscope.exception.ArgumentTypeError(message: str)[源代码]
-
The exception class for argument type error.
- exception agentscope.exception.StudioError(message: str)[源代码]
基类:
Exception
The base class for exception raising during interaction with agentscope studio.
- exception agentscope.exception.StudioRegisterError(message: str)[源代码]
基类:
StudioError
The exception class for error when registering to agentscope studio.
- exception agentscope.exception.AgentServerError(host: str, port: int, message: str | None = None)[源代码]
基类:
Exception
The exception class for agent server related errors.
- __init__(host: str, port: int, message: str | None = None) None [源代码]
Initialize the exception with the message.
- host: str
Hostname of the server.
- port: int
Port of the server.
- message: str
Error message
- exception agentscope.exception.AgentServerNotAliveError(host: str, port: int, message: str | None = None)[源代码]
-
The exception class for agent server not alive error.
- exception agentscope.exception.AgentCreationError(host: str, port: int, message: str | None = None)[源代码]
-
The exception class for failing to create agent.
- exception agentscope.exception.AgentCallError(host: str, port: int, message: str | None = None)[源代码]
-
The exception class for failing to call agent.
- exception agentscope.exception.AgentServerUnsupportedMethodError(host: str, port: int, oid: str, func_name: str)[源代码]
-
The exception class for agent server not supporting certain method.
- exception agentscope.exception.QuotaExceededError(name: str)[源代码]
基类:
Exception
An Exception used to indicate that a certain metric exceeds quota
- exception agentscope.exception.EnvError(message: str)[源代码]
基类:
Exception
The exception class for env related errors.
- exception agentscope.exception.EnvNotFoundError(name: str)[源代码]
基类:
EnvError
The exception class for env not found error.
- exception agentscope.exception.EnvAlreadyExistError(name: str)[源代码]
基类:
EnvError
The exception class for env already exist error.
- exception agentscope.exception.EnvUnsupportedFunctionError(env_name: str, func_name: str)[源代码]
基类:
EnvError
The exception class for use unsupported function of env error.