chore: 添加虚拟环境到仓库

- 添加 backend_service/venv 虚拟环境
- 包含所有Python依赖包
- 注意:虚拟环境约393MB,包含12655个文件
This commit is contained in:
2025-12-03 10:19:25 +08:00
parent a6c2027caa
commit c4f851d387
12655 changed files with 3009376 additions and 0 deletions

View File

@@ -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",
]

View File

@@ -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}"

View File

@@ -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."""