agentrun-inner-test 0.0.62__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of agentrun-inner-test might be problematic. Click here for more details.
- agentrun/__init__.py +358 -0
- agentrun/agent_runtime/__client_async_template.py +466 -0
- agentrun/agent_runtime/__endpoint_async_template.py +345 -0
- agentrun/agent_runtime/__init__.py +53 -0
- agentrun/agent_runtime/__runtime_async_template.py +477 -0
- agentrun/agent_runtime/api/__data_async_template.py +58 -0
- agentrun/agent_runtime/api/__init__.py +6 -0
- agentrun/agent_runtime/api/control.py +1362 -0
- agentrun/agent_runtime/api/data.py +98 -0
- agentrun/agent_runtime/client.py +868 -0
- agentrun/agent_runtime/endpoint.py +649 -0
- agentrun/agent_runtime/model.py +362 -0
- agentrun/agent_runtime/runtime.py +904 -0
- agentrun/credential/__client_async_template.py +177 -0
- agentrun/credential/__credential_async_template.py +216 -0
- agentrun/credential/__init__.py +28 -0
- agentrun/credential/api/__init__.py +5 -0
- agentrun/credential/api/control.py +606 -0
- agentrun/credential/client.py +319 -0
- agentrun/credential/credential.py +381 -0
- agentrun/credential/model.py +248 -0
- agentrun/integration/__init__.py +21 -0
- agentrun/integration/agentscope/__init__.py +13 -0
- agentrun/integration/agentscope/adapter.py +17 -0
- agentrun/integration/agentscope/builtin.py +88 -0
- agentrun/integration/agentscope/message_adapter.py +185 -0
- agentrun/integration/agentscope/model_adapter.py +60 -0
- agentrun/integration/agentscope/tool_adapter.py +59 -0
- agentrun/integration/builtin/__init__.py +18 -0
- agentrun/integration/builtin/knowledgebase.py +137 -0
- agentrun/integration/builtin/model.py +93 -0
- agentrun/integration/builtin/sandbox.py +1234 -0
- agentrun/integration/builtin/toolset.py +47 -0
- agentrun/integration/crewai/__init__.py +13 -0
- agentrun/integration/crewai/adapter.py +9 -0
- agentrun/integration/crewai/builtin.py +88 -0
- agentrun/integration/crewai/model_adapter.py +31 -0
- agentrun/integration/crewai/tool_adapter.py +26 -0
- agentrun/integration/google_adk/__init__.py +13 -0
- agentrun/integration/google_adk/adapter.py +15 -0
- agentrun/integration/google_adk/builtin.py +88 -0
- agentrun/integration/google_adk/message_adapter.py +144 -0
- agentrun/integration/google_adk/model_adapter.py +46 -0
- agentrun/integration/google_adk/tool_adapter.py +235 -0
- agentrun/integration/langchain/__init__.py +31 -0
- agentrun/integration/langchain/adapter.py +15 -0
- agentrun/integration/langchain/builtin.py +94 -0
- agentrun/integration/langchain/message_adapter.py +141 -0
- agentrun/integration/langchain/model_adapter.py +37 -0
- agentrun/integration/langchain/tool_adapter.py +50 -0
- agentrun/integration/langgraph/__init__.py +36 -0
- agentrun/integration/langgraph/adapter.py +20 -0
- agentrun/integration/langgraph/agent_converter.py +1073 -0
- agentrun/integration/langgraph/builtin.py +88 -0
- agentrun/integration/pydantic_ai/__init__.py +13 -0
- agentrun/integration/pydantic_ai/adapter.py +13 -0
- agentrun/integration/pydantic_ai/builtin.py +88 -0
- agentrun/integration/pydantic_ai/model_adapter.py +44 -0
- agentrun/integration/pydantic_ai/tool_adapter.py +19 -0
- agentrun/integration/utils/__init__.py +112 -0
- agentrun/integration/utils/adapter.py +560 -0
- agentrun/integration/utils/canonical.py +164 -0
- agentrun/integration/utils/converter.py +134 -0
- agentrun/integration/utils/model.py +110 -0
- agentrun/integration/utils/tool.py +1759 -0
- agentrun/knowledgebase/__client_async_template.py +173 -0
- agentrun/knowledgebase/__init__.py +53 -0
- agentrun/knowledgebase/__knowledgebase_async_template.py +438 -0
- agentrun/knowledgebase/api/__data_async_template.py +414 -0
- agentrun/knowledgebase/api/__init__.py +19 -0
- agentrun/knowledgebase/api/control.py +606 -0
- agentrun/knowledgebase/api/data.py +624 -0
- agentrun/knowledgebase/client.py +311 -0
- agentrun/knowledgebase/knowledgebase.py +748 -0
- agentrun/knowledgebase/model.py +270 -0
- agentrun/memory_collection/__client_async_template.py +178 -0
- agentrun/memory_collection/__init__.py +37 -0
- agentrun/memory_collection/__memory_collection_async_template.py +457 -0
- agentrun/memory_collection/api/__init__.py +5 -0
- agentrun/memory_collection/api/control.py +610 -0
- agentrun/memory_collection/client.py +323 -0
- agentrun/memory_collection/memory_collection.py +844 -0
- agentrun/memory_collection/model.py +162 -0
- agentrun/model/__client_async_template.py +357 -0
- agentrun/model/__init__.py +57 -0
- agentrun/model/__model_proxy_async_template.py +270 -0
- agentrun/model/__model_service_async_template.py +267 -0
- agentrun/model/api/__init__.py +6 -0
- agentrun/model/api/control.py +1173 -0
- agentrun/model/api/data.py +196 -0
- agentrun/model/client.py +674 -0
- agentrun/model/model.py +235 -0
- agentrun/model/model_proxy.py +439 -0
- agentrun/model/model_service.py +438 -0
- agentrun/sandbox/__aio_sandbox_async_template.py +523 -0
- agentrun/sandbox/__browser_sandbox_async_template.py +110 -0
- agentrun/sandbox/__client_async_template.py +491 -0
- agentrun/sandbox/__code_interpreter_sandbox_async_template.py +463 -0
- agentrun/sandbox/__init__.py +69 -0
- agentrun/sandbox/__sandbox_async_template.py +463 -0
- agentrun/sandbox/__template_async_template.py +152 -0
- agentrun/sandbox/aio_sandbox.py +912 -0
- agentrun/sandbox/api/__aio_data_async_template.py +335 -0
- agentrun/sandbox/api/__browser_data_async_template.py +140 -0
- agentrun/sandbox/api/__code_interpreter_data_async_template.py +206 -0
- agentrun/sandbox/api/__init__.py +19 -0
- agentrun/sandbox/api/__sandbox_data_async_template.py +107 -0
- agentrun/sandbox/api/aio_data.py +551 -0
- agentrun/sandbox/api/browser_data.py +172 -0
- agentrun/sandbox/api/code_interpreter_data.py +396 -0
- agentrun/sandbox/api/control.py +1051 -0
- agentrun/sandbox/api/playwright_async.py +492 -0
- agentrun/sandbox/api/playwright_sync.py +492 -0
- agentrun/sandbox/api/sandbox_data.py +154 -0
- agentrun/sandbox/browser_sandbox.py +185 -0
- agentrun/sandbox/client.py +925 -0
- agentrun/sandbox/code_interpreter_sandbox.py +823 -0
- agentrun/sandbox/model.py +384 -0
- agentrun/sandbox/sandbox.py +848 -0
- agentrun/sandbox/template.py +217 -0
- agentrun/server/__init__.py +191 -0
- agentrun/server/agui_normalizer.py +180 -0
- agentrun/server/agui_protocol.py +797 -0
- agentrun/server/invoker.py +309 -0
- agentrun/server/model.py +427 -0
- agentrun/server/openai_protocol.py +535 -0
- agentrun/server/protocol.py +140 -0
- agentrun/server/server.py +208 -0
- agentrun/toolset/__client_async_template.py +62 -0
- agentrun/toolset/__init__.py +51 -0
- agentrun/toolset/__toolset_async_template.py +204 -0
- agentrun/toolset/api/__init__.py +17 -0
- agentrun/toolset/api/control.py +262 -0
- agentrun/toolset/api/mcp.py +100 -0
- agentrun/toolset/api/openapi.py +1251 -0
- agentrun/toolset/client.py +102 -0
- agentrun/toolset/model.py +321 -0
- agentrun/toolset/toolset.py +271 -0
- agentrun/utils/__data_api_async_template.py +721 -0
- agentrun/utils/__init__.py +5 -0
- agentrun/utils/__resource_async_template.py +158 -0
- agentrun/utils/config.py +270 -0
- agentrun/utils/control_api.py +105 -0
- agentrun/utils/data_api.py +1121 -0
- agentrun/utils/exception.py +151 -0
- agentrun/utils/helper.py +108 -0
- agentrun/utils/log.py +77 -0
- agentrun/utils/model.py +168 -0
- agentrun/utils/resource.py +291 -0
- agentrun_inner_test-0.0.62.dist-info/METADATA +265 -0
- agentrun_inner_test-0.0.62.dist-info/RECORD +154 -0
- agentrun_inner_test-0.0.62.dist-info/WHEEL +5 -0
- agentrun_inner_test-0.0.62.dist-info/licenses/LICENSE +201 -0
- agentrun_inner_test-0.0.62.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This file is auto generated by the code generation script.
|
|
3
|
+
Do not modify this file manually.
|
|
4
|
+
Use the `make codegen` command to regenerate.
|
|
5
|
+
|
|
6
|
+
当前文件为自动生成的控制 API 客户端代码。请勿手动修改此文件。
|
|
7
|
+
使用 `make codegen` 命令重新生成。
|
|
8
|
+
|
|
9
|
+
source: agentrun/knowledgebase/__client_async_template.py
|
|
10
|
+
|
|
11
|
+
KnowledgeBase 客户端 / KnowledgeBase Client
|
|
12
|
+
|
|
13
|
+
此模块提供知识库管理的客户端API。
|
|
14
|
+
This module provides the client API for knowledge base management.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from typing import Optional
|
|
18
|
+
|
|
19
|
+
from alibabacloud_agentrun20250910.models import (
|
|
20
|
+
CreateKnowledgeBaseInput,
|
|
21
|
+
ListKnowledgeBasesRequest,
|
|
22
|
+
UpdateKnowledgeBaseInput,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
from agentrun.utils.config import Config
|
|
26
|
+
from agentrun.utils.exception import HTTPError
|
|
27
|
+
|
|
28
|
+
from .api.control import KnowledgeBaseControlAPI
|
|
29
|
+
from .knowledgebase import KnowledgeBase
|
|
30
|
+
from .model import (
|
|
31
|
+
KnowledgeBaseCreateInput,
|
|
32
|
+
KnowledgeBaseListInput,
|
|
33
|
+
KnowledgeBaseListOutput,
|
|
34
|
+
KnowledgeBaseUpdateInput,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class KnowledgeBaseClient:
|
|
39
|
+
"""KnowledgeBase 客户端 / KnowledgeBase Client
|
|
40
|
+
|
|
41
|
+
提供知识库的创建、删除、更新和查询功能。
|
|
42
|
+
Provides create, delete, update and query functions for knowledge bases.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def __init__(self, config: Optional[Config] = None):
|
|
46
|
+
"""初始化客户端 / Initialize client
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
config: 配置对象,可选 / Configuration object, optional
|
|
50
|
+
"""
|
|
51
|
+
self.__control_api = KnowledgeBaseControlAPI(config)
|
|
52
|
+
|
|
53
|
+
async def create_async(
|
|
54
|
+
self, input: KnowledgeBaseCreateInput, config: Optional[Config] = None
|
|
55
|
+
):
|
|
56
|
+
"""创建知识库(异步) / Create knowledge base asynchronously
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
input: 知识库输入参数 / KnowledgeBase input parameters
|
|
60
|
+
config: 配置对象,可选 / Configuration object, optional
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
KnowledgeBase: 创建的知识库对象 / Created knowledge base object
|
|
64
|
+
|
|
65
|
+
Raises:
|
|
66
|
+
ResourceAlreadyExistError: 资源已存在 / Resource already exists
|
|
67
|
+
HTTPError: HTTP 请求错误 / HTTP request error
|
|
68
|
+
"""
|
|
69
|
+
try:
|
|
70
|
+
result = await self.__control_api.create_knowledge_base_async(
|
|
71
|
+
CreateKnowledgeBaseInput().from_map(input.model_dump()),
|
|
72
|
+
config=config,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
return KnowledgeBase.from_inner_object(result)
|
|
76
|
+
except HTTPError as e:
|
|
77
|
+
raise e.to_resource_error(
|
|
78
|
+
"KnowledgeBase", input.knowledge_base_name
|
|
79
|
+
) from e
|
|
80
|
+
|
|
81
|
+
def create(
|
|
82
|
+
self, input: KnowledgeBaseCreateInput, config: Optional[Config] = None
|
|
83
|
+
):
|
|
84
|
+
"""创建知识库(同步) / Create knowledge base asynchronously
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
input: 知识库输入参数 / KnowledgeBase input parameters
|
|
88
|
+
config: 配置对象,可选 / Configuration object, optional
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
KnowledgeBase: 创建的知识库对象 / Created knowledge base object
|
|
92
|
+
|
|
93
|
+
Raises:
|
|
94
|
+
ResourceAlreadyExistError: 资源已存在 / Resource already exists
|
|
95
|
+
HTTPError: HTTP 请求错误 / HTTP request error
|
|
96
|
+
"""
|
|
97
|
+
try:
|
|
98
|
+
result = self.__control_api.create_knowledge_base(
|
|
99
|
+
CreateKnowledgeBaseInput().from_map(input.model_dump()),
|
|
100
|
+
config=config,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
return KnowledgeBase.from_inner_object(result)
|
|
104
|
+
except HTTPError as e:
|
|
105
|
+
raise e.to_resource_error(
|
|
106
|
+
"KnowledgeBase", input.knowledge_base_name
|
|
107
|
+
) from e
|
|
108
|
+
|
|
109
|
+
async def delete_async(
|
|
110
|
+
self, knowledge_base_name: str, config: Optional[Config] = None
|
|
111
|
+
):
|
|
112
|
+
"""删除知识库(异步)/ Delete knowledge base asynchronously
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
knowledge_base_name: 知识库名称 / KnowledgeBase name
|
|
116
|
+
config: 配置 / Configuration
|
|
117
|
+
|
|
118
|
+
Raises:
|
|
119
|
+
ResourceNotExistError: 知识库不存在 / KnowledgeBase not found
|
|
120
|
+
"""
|
|
121
|
+
try:
|
|
122
|
+
result = await self.__control_api.delete_knowledge_base_async(
|
|
123
|
+
knowledge_base_name, config=config
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
return KnowledgeBase.from_inner_object(result)
|
|
127
|
+
|
|
128
|
+
except HTTPError as e:
|
|
129
|
+
raise e.to_resource_error(
|
|
130
|
+
"KnowledgeBase", knowledge_base_name
|
|
131
|
+
) from e
|
|
132
|
+
|
|
133
|
+
def delete(self, knowledge_base_name: str, config: Optional[Config] = None):
|
|
134
|
+
"""删除知识库(同步)/ Delete knowledge base asynchronously
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
knowledge_base_name: 知识库名称 / KnowledgeBase name
|
|
138
|
+
config: 配置 / Configuration
|
|
139
|
+
|
|
140
|
+
Raises:
|
|
141
|
+
ResourceNotExistError: 知识库不存在 / KnowledgeBase not found
|
|
142
|
+
"""
|
|
143
|
+
try:
|
|
144
|
+
result = self.__control_api.delete_knowledge_base(
|
|
145
|
+
knowledge_base_name, config=config
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
return KnowledgeBase.from_inner_object(result)
|
|
149
|
+
|
|
150
|
+
except HTTPError as e:
|
|
151
|
+
raise e.to_resource_error(
|
|
152
|
+
"KnowledgeBase", knowledge_base_name
|
|
153
|
+
) from e
|
|
154
|
+
|
|
155
|
+
async def update_async(
|
|
156
|
+
self,
|
|
157
|
+
knowledge_base_name: str,
|
|
158
|
+
input: KnowledgeBaseUpdateInput,
|
|
159
|
+
config: Optional[Config] = None,
|
|
160
|
+
):
|
|
161
|
+
"""更新知识库(异步)/ Update knowledge base asynchronously
|
|
162
|
+
|
|
163
|
+
Args:
|
|
164
|
+
knowledge_base_name: 知识库名称 / KnowledgeBase name
|
|
165
|
+
input: 知识库更新输入参数 / KnowledgeBase update input parameters
|
|
166
|
+
config: 配置 / Configuration
|
|
167
|
+
|
|
168
|
+
Returns:
|
|
169
|
+
KnowledgeBase: 更新后的知识库对象 / Updated knowledge base object
|
|
170
|
+
|
|
171
|
+
Raises:
|
|
172
|
+
ResourceNotExistError: 知识库不存在 / KnowledgeBase not found
|
|
173
|
+
"""
|
|
174
|
+
try:
|
|
175
|
+
result = await self.__control_api.update_knowledge_base_async(
|
|
176
|
+
knowledge_base_name,
|
|
177
|
+
UpdateKnowledgeBaseInput().from_map(input.model_dump()),
|
|
178
|
+
config=config,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
return KnowledgeBase.from_inner_object(result)
|
|
182
|
+
except HTTPError as e:
|
|
183
|
+
raise e.to_resource_error(
|
|
184
|
+
"KnowledgeBase", knowledge_base_name
|
|
185
|
+
) from e
|
|
186
|
+
|
|
187
|
+
def update(
|
|
188
|
+
self,
|
|
189
|
+
knowledge_base_name: str,
|
|
190
|
+
input: KnowledgeBaseUpdateInput,
|
|
191
|
+
config: Optional[Config] = None,
|
|
192
|
+
):
|
|
193
|
+
"""更新知识库(同步)/ Update knowledge base asynchronously
|
|
194
|
+
|
|
195
|
+
Args:
|
|
196
|
+
knowledge_base_name: 知识库名称 / KnowledgeBase name
|
|
197
|
+
input: 知识库更新输入参数 / KnowledgeBase update input parameters
|
|
198
|
+
config: 配置 / Configuration
|
|
199
|
+
|
|
200
|
+
Returns:
|
|
201
|
+
KnowledgeBase: 更新后的知识库对象 / Updated knowledge base object
|
|
202
|
+
|
|
203
|
+
Raises:
|
|
204
|
+
ResourceNotExistError: 知识库不存在 / KnowledgeBase not found
|
|
205
|
+
"""
|
|
206
|
+
try:
|
|
207
|
+
result = self.__control_api.update_knowledge_base(
|
|
208
|
+
knowledge_base_name,
|
|
209
|
+
UpdateKnowledgeBaseInput().from_map(input.model_dump()),
|
|
210
|
+
config=config,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
return KnowledgeBase.from_inner_object(result)
|
|
214
|
+
except HTTPError as e:
|
|
215
|
+
raise e.to_resource_error(
|
|
216
|
+
"KnowledgeBase", knowledge_base_name
|
|
217
|
+
) from e
|
|
218
|
+
|
|
219
|
+
async def get_async(
|
|
220
|
+
self, knowledge_base_name: str, config: Optional[Config] = None
|
|
221
|
+
):
|
|
222
|
+
"""获取知识库(异步)/ Get knowledge base asynchronously
|
|
223
|
+
|
|
224
|
+
Args:
|
|
225
|
+
knowledge_base_name: 知识库名称 / KnowledgeBase name
|
|
226
|
+
config: 配置 / Configuration
|
|
227
|
+
|
|
228
|
+
Returns:
|
|
229
|
+
KnowledgeBase: 知识库对象 / KnowledgeBase object
|
|
230
|
+
|
|
231
|
+
Raises:
|
|
232
|
+
ResourceNotExistError: 知识库不存在 / KnowledgeBase not found
|
|
233
|
+
"""
|
|
234
|
+
try:
|
|
235
|
+
result = await self.__control_api.get_knowledge_base_async(
|
|
236
|
+
knowledge_base_name, config=config
|
|
237
|
+
)
|
|
238
|
+
return KnowledgeBase.from_inner_object(result)
|
|
239
|
+
except HTTPError as e:
|
|
240
|
+
raise e.to_resource_error(
|
|
241
|
+
"KnowledgeBase", knowledge_base_name
|
|
242
|
+
) from e
|
|
243
|
+
|
|
244
|
+
def get(self, knowledge_base_name: str, config: Optional[Config] = None):
|
|
245
|
+
"""获取知识库(同步)/ Get knowledge base asynchronously
|
|
246
|
+
|
|
247
|
+
Args:
|
|
248
|
+
knowledge_base_name: 知识库名称 / KnowledgeBase name
|
|
249
|
+
config: 配置 / Configuration
|
|
250
|
+
|
|
251
|
+
Returns:
|
|
252
|
+
KnowledgeBase: 知识库对象 / KnowledgeBase object
|
|
253
|
+
|
|
254
|
+
Raises:
|
|
255
|
+
ResourceNotExistError: 知识库不存在 / KnowledgeBase not found
|
|
256
|
+
"""
|
|
257
|
+
try:
|
|
258
|
+
result = self.__control_api.get_knowledge_base(
|
|
259
|
+
knowledge_base_name, config=config
|
|
260
|
+
)
|
|
261
|
+
return KnowledgeBase.from_inner_object(result)
|
|
262
|
+
except HTTPError as e:
|
|
263
|
+
raise e.to_resource_error(
|
|
264
|
+
"KnowledgeBase", knowledge_base_name
|
|
265
|
+
) from e
|
|
266
|
+
|
|
267
|
+
async def list_async(
|
|
268
|
+
self,
|
|
269
|
+
input: Optional[KnowledgeBaseListInput] = None,
|
|
270
|
+
config: Optional[Config] = None,
|
|
271
|
+
):
|
|
272
|
+
"""列出知识库(异步)/ List knowledge bases asynchronously
|
|
273
|
+
|
|
274
|
+
Args:
|
|
275
|
+
input: 分页查询参数 / Pagination query parameters
|
|
276
|
+
config: 配置 / Configuration
|
|
277
|
+
|
|
278
|
+
Returns:
|
|
279
|
+
List[KnowledgeBaseListOutput]: 知识库列表 / KnowledgeBase list
|
|
280
|
+
"""
|
|
281
|
+
if input is None:
|
|
282
|
+
input = KnowledgeBaseListInput()
|
|
283
|
+
|
|
284
|
+
results = await self.__control_api.list_knowledge_bases_async(
|
|
285
|
+
ListKnowledgeBasesRequest().from_map(input.model_dump()),
|
|
286
|
+
config=config,
|
|
287
|
+
)
|
|
288
|
+
return [KnowledgeBaseListOutput.from_inner_object(item) for item in results.items] # type: ignore
|
|
289
|
+
|
|
290
|
+
def list(
|
|
291
|
+
self,
|
|
292
|
+
input: Optional[KnowledgeBaseListInput] = None,
|
|
293
|
+
config: Optional[Config] = None,
|
|
294
|
+
):
|
|
295
|
+
"""列出知识库(同步)/ List knowledge bases asynchronously
|
|
296
|
+
|
|
297
|
+
Args:
|
|
298
|
+
input: 分页查询参数 / Pagination query parameters
|
|
299
|
+
config: 配置 / Configuration
|
|
300
|
+
|
|
301
|
+
Returns:
|
|
302
|
+
List[KnowledgeBaseListOutput]: 知识库列表 / KnowledgeBase list
|
|
303
|
+
"""
|
|
304
|
+
if input is None:
|
|
305
|
+
input = KnowledgeBaseListInput()
|
|
306
|
+
|
|
307
|
+
results = self.__control_api.list_knowledge_bases(
|
|
308
|
+
ListKnowledgeBasesRequest().from_map(input.model_dump()),
|
|
309
|
+
config=config,
|
|
310
|
+
)
|
|
311
|
+
return [KnowledgeBaseListOutput.from_inner_object(item) for item in results.items] # type: ignore
|