chore: 添加虚拟环境到仓库
- 添加 backend_service/venv 虚拟环境 - 包含所有Python依赖包 - 注意:虚拟环境约393MB,包含12655个文件
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""The exception module in agentscope."""
|
||||
|
||||
from ._exception_base import AgentOrientedExceptionBase
|
||||
from ._tool import (
|
||||
ToolInterruptedError,
|
||||
ToolNotFoundError,
|
||||
ToolInvalidArgumentsError,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"AgentOrientedExceptionBase",
|
||||
"ToolInterruptedError",
|
||||
"ToolNotFoundError",
|
||||
"ToolInvalidArgumentsError",
|
||||
]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""The base exception class in agentscope."""
|
||||
|
||||
|
||||
class AgentOrientedExceptionBase(Exception):
|
||||
"""The base class for all agent-oriented exceptions. These exceptions are
|
||||
expect to the captured and exposed to the agent during runtime, so that
|
||||
agents can handle the error appropriately during the runtime.
|
||||
"""
|
||||
|
||||
def __init__(self, message: str):
|
||||
"""Initialize the exception with a message."""
|
||||
super().__init__(message)
|
||||
self.message = message
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""Return the string representation of the exception."""
|
||||
return f"{self.__class__.__name__}: {self.message}"
|
||||
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""The tool-related exceptions in agentscope."""
|
||||
|
||||
from ._exception_base import AgentOrientedExceptionBase
|
||||
|
||||
|
||||
class ToolNotFoundError(AgentOrientedExceptionBase):
|
||||
"""Exception raised when a tool was not found."""
|
||||
|
||||
|
||||
class ToolInterruptedError(AgentOrientedExceptionBase):
|
||||
"""Exception raised when a tool calling was interrupted by the user."""
|
||||
|
||||
|
||||
class ToolInvalidArgumentsError(AgentOrientedExceptionBase):
|
||||
"""Exception raised when the arguments passed to a tool are invalid."""
|
||||
Reference in New Issue
Block a user