Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions agentrun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@
)
# Sandbox
from agentrun.sandbox import (
AioSandbox,
BrowserSandbox,
CodeInterpreterSandbox,
CustomSandbox,
SandboxClient,
Template,
)
Expand Down Expand Up @@ -239,6 +241,8 @@
"SandboxClient",
"BrowserSandbox",
"CodeInterpreterSandbox",
"AioSandbox",
"CustomSandbox",
"Template",
######## ToolSet ########
"ToolSetClient",
Expand Down
22 changes: 11 additions & 11 deletions agentrun/agent_runtime/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async def create_async(
def create(
self, input: AgentRuntimeCreateInput, config: Optional[Config] = None
) -> AgentRuntime:
"""同步创建 Agent Runtime / Create Agent Runtime asynchronously
"""同步创建 Agent Runtime / Create Agent Runtime synchronously

Args:
input: Agent Runtime 创建配置 / Agent Runtime creation configuration
Expand Down Expand Up @@ -176,7 +176,7 @@ async def delete_async(
raise e.to_resource_error("AgentRuntime", id) from e

def delete(self, id: str, config: Optional[Config] = None) -> AgentRuntime:
"""同步删除 Agent Runtime / Delete Agent Runtime asynchronously
"""同步删除 Agent Runtime / Delete Agent Runtime synchronously

Args:
id: Agent Runtime ID
Expand Down Expand Up @@ -231,7 +231,7 @@ def update(
input: AgentRuntimeUpdateInput,
config: Optional[Config] = None,
) -> AgentRuntime:
"""同步更新 Agent Runtime / Update Agent Runtime asynchronously
"""同步更新 Agent Runtime / Update Agent Runtime synchronously

Args:
id: Agent Runtime ID
Expand Down Expand Up @@ -286,7 +286,7 @@ def get(
id: str,
config: Optional[Config] = None,
) -> AgentRuntime:
"""同步获取 Agent Runtime / Get Agent Runtime asynchronously
"""同步获取 Agent Runtime / Get Agent Runtime synchronously

Args:
id: Agent Runtime ID
Expand Down Expand Up @@ -343,7 +343,7 @@ def list(
input: Optional[AgentRuntimeListInput] = None,
config: Optional[Config] = None,
) -> List[AgentRuntime]:
"""同步列出 Agent Runtimes / List Agent Runtimes asynchronously
"""同步列出 Agent Runtimes / List Agent Runtimes synchronously

Args:
input: 列表查询配置,可选 / List query configuration, optional
Expand Down Expand Up @@ -417,7 +417,7 @@ def create_endpoint(
endpoint: AgentRuntimeEndpointCreateInput,
config: Optional[Config] = None,
) -> AgentRuntimeEndpoint:
"""同步创建 Agent Runtime 端点 / Create Agent Runtime Endpoint asynchronously
"""同步创建 Agent Runtime 端点 / Create Agent Runtime Endpoint synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -496,7 +496,7 @@ def delete_endpoint(
endpoint_id: str,
config: Optional[Config] = None,
) -> AgentRuntimeEndpoint:
"""同步删除 Agent Runtime 端点 / Delete Agent Runtime Endpoint asynchronously
"""同步删除 Agent Runtime 端点 / Delete Agent Runtime Endpoint synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -578,7 +578,7 @@ def update_endpoint(
endpoint: AgentRuntimeEndpointUpdateInput,
config: Optional[Config] = None,
) -> AgentRuntimeEndpoint:
"""同步更新 Agent Runtime 端点 / Update Agent Runtime Endpoint asynchronously
"""同步更新 Agent Runtime 端点 / Update Agent Runtime Endpoint synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -656,7 +656,7 @@ def get_endpoint(
endpoint_id: str,
config: Optional[Config] = None,
) -> AgentRuntimeEndpoint:
"""同步获取 Agent Runtime 端点 / Get Agent Runtime Endpoint asynchronously
"""同步获取 Agent Runtime 端点 / Get Agent Runtime Endpoint synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -732,7 +732,7 @@ def list_endpoints(
input: Optional[AgentRuntimeEndpointListInput] = None,
config: Optional[Config] = None,
) -> List[AgentRuntimeEndpoint]:
"""同步列出 Agent Runtime 端点 / List Agent Runtime Endpoints asynchronously
"""同步列出 Agent Runtime 端点 / List Agent Runtime Endpoints synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -806,7 +806,7 @@ def list_versions(
input: Optional[AgentRuntimeVersionListInput] = None,
config: Optional[Config] = None,
) -> List[AgentRuntimeVersion]:
"""同步列出 Agent Runtime 版本 / List Agent Runtime Versions asynchronously
"""同步列出 Agent Runtime 版本 / List Agent Runtime Versions synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down
16 changes: 8 additions & 8 deletions agentrun/agent_runtime/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def create_by_id(
input: AgentRuntimeEndpointCreateInput,
config: Optional[Config] = None,
):
"""根据 ID 同步创建端点 / Create endpoint by ID asynchronously
"""根据 ID 同步创建端点 / Create endpoint by ID synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -148,7 +148,7 @@ def delete_by_id(
endpoint_id: str,
config: Optional[Config] = None,
):
"""根据 ID 同步删除端点 / Delete endpoint by ID asynchronously
"""根据 ID 同步删除端点 / Delete endpoint by ID synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -208,7 +208,7 @@ def update_by_id(
input: AgentRuntimeEndpointUpdateInput,
config: Optional[Config] = None,
):
"""根据 ID 同步更新端点 / Update endpoint by ID asynchronously
"""根据 ID 同步更新端点 / Update endpoint by ID synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -266,7 +266,7 @@ def get_by_id(
endpoint_id: str,
config: Optional[Config] = None,
):
"""根据 ID 同步获取端点 / Get endpoint by ID asynchronously
"""根据 ID 同步获取端点 / Get endpoint by ID synchronously

Args:
agent_runtime_id: Agent Runtime ID
Expand Down Expand Up @@ -414,7 +414,7 @@ async def list_by_id_async(

@classmethod
def list_by_id(cls, agent_runtime_id: str, config: Optional[Config] = None):
"""根据 Agent Runtime ID 同步列出所有端点 / List all endpoints by Agent Runtime ID asynchronously
"""根据 Agent Runtime ID 同步列出所有端点 / List all endpoints by Agent Runtime ID synchronously

此方法会自动分页获取所有端点并去重。
This method automatically paginates to get all endpoints and deduplicates them.
Expand Down Expand Up @@ -489,7 +489,7 @@ async def delete_async(
return self

def delete(self, config: Optional[Config] = None) -> "AgentRuntimeEndpoint":
"""同步删除当前端点 / Delete current endpoint asynchronously
"""同步删除当前端点 / Delete current endpoint synchronously

Args:
config: 配置对象,可选 / Configuration object, optional
Expand Down Expand Up @@ -559,7 +559,7 @@ def update(
input: AgentRuntimeEndpointUpdateInput,
config: Optional[Config] = None,
) -> Self:
"""同步更新当前端点 / Update current endpoint asynchronously
"""同步更新当前端点 / Update current endpoint synchronously

Args:
input: 端点更新配置 / Endpoint update configuration
Expand Down Expand Up @@ -621,7 +621,7 @@ async def get_async(self, config: Optional[Config] = None):
return self

def get(self, config: Optional[Config] = None):
"""同步获取当前端点信息 / Get current endpoint information asynchronously
"""同步获取当前端点信息 / Get current endpoint information synchronously

Args:
config: 配置对象,可选 / Configuration object, optional
Expand Down
10 changes: 5 additions & 5 deletions agentrun/agent_runtime/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def create_async(
def create(
cls, input: AgentRuntimeCreateInput, config: Optional[Config] = None
):
"""同步创建 Agent Runtime / Create Agent Runtime asynchronously
"""同步创建 Agent Runtime / Create Agent Runtime synchronously

Args:
input: Agent Runtime 创建配置 / Agent Runtime creation configuration
Expand Down Expand Up @@ -142,7 +142,7 @@ async def delete_by_id_async(cls, id: str, config: Optional[Config] = None):

@classmethod
def delete_by_id(cls, id: str, config: Optional[Config] = None):
"""根据 ID 同步删除 Agent Runtime / Delete Agent Runtime by ID asynchronously
"""根据 ID 同步删除 Agent Runtime / Delete Agent Runtime by ID synchronously

此方法会先删除所有关联的端点,然后再删除 Agent Runtime。
This method will first delete all associated endpoints, then delete the Agent Runtime.
Expand Down Expand Up @@ -205,7 +205,7 @@ def update_by_id(
input: AgentRuntimeUpdateInput,
config: Optional[Config] = None,
):
"""根据 ID 同步更新 Agent Runtime / Update Agent Runtime by ID asynchronously
"""根据 ID 同步更新 Agent Runtime / Update Agent Runtime by ID synchronously

Args:
id: Agent Runtime ID
Expand Down Expand Up @@ -240,7 +240,7 @@ async def get_by_id_async(cls, id: str, config: Optional[Config] = None):

@classmethod
def get_by_id(cls, id: str, config: Optional[Config] = None):
"""根据 ID 同步获取 Agent Runtime / Get Agent Runtime by ID asynchronously
"""根据 ID 同步获取 Agent Runtime / Get Agent Runtime by ID synchronously

Args:
id: Agent Runtime ID
Expand Down Expand Up @@ -359,7 +359,7 @@ async def list_async(cls, config: Optional[Config] = None):

@classmethod
def list(cls, config: Optional[Config] = None):
"""同步列出所有 Agent Runtimes / List all Agent Runtimes asynchronously
"""同步列出所有 Agent Runtimes / List all Agent Runtimes synchronously

此方法会自动分页获取所有 Agent Runtimes 并去重。
This method automatically paginates to get all Agent Runtimes and deduplicates them.
Expand Down
2 changes: 1 addition & 1 deletion agentrun/credential/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def create_async(
def create(
self, input: CredentialCreateInput, config: Optional[Config] = None
):
"""创建凭证(同步) / Create credential asynchronously
"""创建凭证(同步) / Create credential synchronously

Args:
input: 凭证输入参数 / Credential input parameters
Expand Down
2 changes: 1 addition & 1 deletion agentrun/knowledgebase/api/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
)
from alibabacloud_tea_openapi.exceptions._client import ClientException
from alibabacloud_tea_openapi.exceptions._server import ServerException
from alibabacloud_tea_util.models import RuntimeOptions
from darabonba.runtime import RuntimeOptions
import pydash

from agentrun.utils.config import Config
Expand Down
10 changes: 5 additions & 5 deletions agentrun/knowledgebase/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def create_async(
def create(
self, input: KnowledgeBaseCreateInput, config: Optional[Config] = None
):
"""创建知识库(同步) / Create knowledge base asynchronously
"""创建知识库(同步) / Create knowledge base synchronously

Args:
input: 知识库输入参数 / KnowledgeBase input parameters
Expand Down Expand Up @@ -131,7 +131,7 @@ async def delete_async(
) from e

def delete(self, knowledge_base_name: str, config: Optional[Config] = None):
"""删除知识库(同步)/ Delete knowledge base asynchronously
"""删除知识库(同步)/ Delete knowledge base synchronously

Args:
knowledge_base_name: 知识库名称 / KnowledgeBase name
Expand Down Expand Up @@ -190,7 +190,7 @@ def update(
input: KnowledgeBaseUpdateInput,
config: Optional[Config] = None,
):
"""更新知识库(同步)/ Update knowledge base asynchronously
"""更新知识库(同步)/ Update knowledge base synchronously

Args:
knowledge_base_name: 知识库名称 / KnowledgeBase name
Expand Down Expand Up @@ -242,7 +242,7 @@ async def get_async(
) from e

def get(self, knowledge_base_name: str, config: Optional[Config] = None):
"""获取知识库(同步)/ Get knowledge base asynchronously
"""获取知识库(同步)/ Get knowledge base synchronously

Args:
knowledge_base_name: 知识库名称 / KnowledgeBase name
Expand Down Expand Up @@ -292,7 +292,7 @@ def list(
input: Optional[KnowledgeBaseListInput] = None,
config: Optional[Config] = None,
):
"""列出知识库(同步)/ List knowledge bases asynchronously
"""列出知识库(同步)/ List knowledge bases synchronously

Args:
input: 分页查询参数 / Pagination query parameters
Expand Down
Loading
Loading