alibabacloud-agentrun20250910 5.0.0__py3-none-any.whl → 5.1.0__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.
- alibabacloud_agentrun20250910/__init__.py +1 -1
- alibabacloud_agentrun20250910/client.py +360 -0
- alibabacloud_agentrun20250910/models/__init__.py +54 -0
- alibabacloud_agentrun20250910/models/_create_custom_domain_input.py +8 -0
- alibabacloud_agentrun20250910/models/_create_knowledge_base_input.py +78 -0
- alibabacloud_agentrun20250910/models/_create_knowledge_base_request.py +36 -0
- alibabacloud_agentrun20250910/models/_create_knowledge_base_response.py +54 -0
- alibabacloud_agentrun20250910/models/_create_memory_collection_input.py +101 -0
- alibabacloud_agentrun20250910/models/_custom_domain.py +8 -0
- alibabacloud_agentrun20250910/models/_delete_knowledge_base_response.py +54 -0
- alibabacloud_agentrun20250910/models/_delete_knowledge_base_result.py +52 -0
- alibabacloud_agentrun20250910/models/_embedder_config.py +71 -0
- alibabacloud_agentrun20250910/models/_get_knowledge_base_response.py +54 -0
- alibabacloud_agentrun20250910/models/_knowledge_base.py +99 -0
- alibabacloud_agentrun20250910/models/_knowledge_base_result.py +52 -0
- alibabacloud_agentrun20250910/models/_list_knowledge_bases_output.py +68 -0
- alibabacloud_agentrun20250910/models/_list_knowledge_bases_request.py +49 -0
- alibabacloud_agentrun20250910/models/_list_knowledge_bases_response.py +54 -0
- alibabacloud_agentrun20250910/models/_list_knowledge_bases_result.py +52 -0
- alibabacloud_agentrun20250910/models/_list_memory_collections_output.py +68 -0
- alibabacloud_agentrun20250910/models/_list_memory_collections_result.py +52 -0
- alibabacloud_agentrun20250910/models/_llmconfig.py +71 -0
- alibabacloud_agentrun20250910/models/_memory_collection.py +117 -0
- alibabacloud_agentrun20250910/models/_memory_collection_result.py +52 -0
- alibabacloud_agentrun20250910/models/_update_knowledge_base_input.py +59 -0
- alibabacloud_agentrun20250910/models/_update_knowledge_base_request.py +36 -0
- alibabacloud_agentrun20250910/models/_update_knowledge_base_response.py +54 -0
- alibabacloud_agentrun20250910/models/_update_memory_collection_input.py +85 -0
- alibabacloud_agentrun20250910/models/_vector_store_config.py +95 -0
- {alibabacloud_agentrun20250910-5.0.0.dist-info → alibabacloud_agentrun20250910-5.1.0.dist-info}/METADATA +1 -1
- {alibabacloud_agentrun20250910-5.0.0.dist-info → alibabacloud_agentrun20250910-5.1.0.dist-info}/RECORD +34 -10
- {alibabacloud_agentrun20250910-5.0.0.dist-info → alibabacloud_agentrun20250910-5.1.0.dist-info}/LICENSE +0 -0
- {alibabacloud_agentrun20250910-5.0.0.dist-info → alibabacloud_agentrun20250910-5.1.0.dist-info}/WHEEL +0 -0
- {alibabacloud_agentrun20250910-5.0.0.dist-info → alibabacloud_agentrun20250910-5.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Any
|
|
6
|
+
|
|
7
|
+
from darabonba.model import DaraModel
|
|
8
|
+
|
|
9
|
+
class CreateKnowledgeBaseInput(DaraModel):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
credential_name: str = None,
|
|
13
|
+
description: str = None,
|
|
14
|
+
knowledge_base_name: str = None,
|
|
15
|
+
provider: str = None,
|
|
16
|
+
provider_settings: Dict[str, Any] = None,
|
|
17
|
+
retrieve_settings: Dict[str, Any] = None,
|
|
18
|
+
):
|
|
19
|
+
self.credential_name = credential_name
|
|
20
|
+
self.description = description
|
|
21
|
+
# This parameter is required.
|
|
22
|
+
self.knowledge_base_name = knowledge_base_name
|
|
23
|
+
# This parameter is required.
|
|
24
|
+
self.provider = provider
|
|
25
|
+
# This parameter is required.
|
|
26
|
+
self.provider_settings = provider_settings
|
|
27
|
+
self.retrieve_settings = retrieve_settings
|
|
28
|
+
|
|
29
|
+
def validate(self):
|
|
30
|
+
pass
|
|
31
|
+
|
|
32
|
+
def to_map(self):
|
|
33
|
+
result = dict()
|
|
34
|
+
_map = super().to_map()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
result = _map
|
|
37
|
+
if self.credential_name is not None:
|
|
38
|
+
result['credentialName'] = self.credential_name
|
|
39
|
+
|
|
40
|
+
if self.description is not None:
|
|
41
|
+
result['description'] = self.description
|
|
42
|
+
|
|
43
|
+
if self.knowledge_base_name is not None:
|
|
44
|
+
result['knowledgeBaseName'] = self.knowledge_base_name
|
|
45
|
+
|
|
46
|
+
if self.provider is not None:
|
|
47
|
+
result['provider'] = self.provider
|
|
48
|
+
|
|
49
|
+
if self.provider_settings is not None:
|
|
50
|
+
result['providerSettings'] = self.provider_settings
|
|
51
|
+
|
|
52
|
+
if self.retrieve_settings is not None:
|
|
53
|
+
result['retrieveSettings'] = self.retrieve_settings
|
|
54
|
+
|
|
55
|
+
return result
|
|
56
|
+
|
|
57
|
+
def from_map(self, m: dict = None):
|
|
58
|
+
m = m or dict()
|
|
59
|
+
if m.get('credentialName') is not None:
|
|
60
|
+
self.credential_name = m.get('credentialName')
|
|
61
|
+
|
|
62
|
+
if m.get('description') is not None:
|
|
63
|
+
self.description = m.get('description')
|
|
64
|
+
|
|
65
|
+
if m.get('knowledgeBaseName') is not None:
|
|
66
|
+
self.knowledge_base_name = m.get('knowledgeBaseName')
|
|
67
|
+
|
|
68
|
+
if m.get('provider') is not None:
|
|
69
|
+
self.provider = m.get('provider')
|
|
70
|
+
|
|
71
|
+
if m.get('providerSettings') is not None:
|
|
72
|
+
self.provider_settings = m.get('providerSettings')
|
|
73
|
+
|
|
74
|
+
if m.get('retrieveSettings') is not None:
|
|
75
|
+
self.retrieve_settings = m.get('retrieveSettings')
|
|
76
|
+
|
|
77
|
+
return self
|
|
78
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from alibabacloud_agentrun20250910 import models as main_models
|
|
6
|
+
from darabonba.model import DaraModel
|
|
7
|
+
|
|
8
|
+
class CreateKnowledgeBaseRequest(DaraModel):
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
body: main_models.CreateKnowledgeBaseInput = None,
|
|
12
|
+
):
|
|
13
|
+
self.body = body
|
|
14
|
+
|
|
15
|
+
def validate(self):
|
|
16
|
+
if self.body:
|
|
17
|
+
self.body.validate()
|
|
18
|
+
|
|
19
|
+
def to_map(self):
|
|
20
|
+
result = dict()
|
|
21
|
+
_map = super().to_map()
|
|
22
|
+
if _map is not None:
|
|
23
|
+
result = _map
|
|
24
|
+
if self.body is not None:
|
|
25
|
+
result['body'] = self.body.to_map()
|
|
26
|
+
|
|
27
|
+
return result
|
|
28
|
+
|
|
29
|
+
def from_map(self, m: dict = None):
|
|
30
|
+
m = m or dict()
|
|
31
|
+
if m.get('body') is not None:
|
|
32
|
+
temp_model = main_models.CreateKnowledgeBaseInput()
|
|
33
|
+
self.body = temp_model.from_map(m.get('body'))
|
|
34
|
+
|
|
35
|
+
return self
|
|
36
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
|
|
7
|
+
from alibabacloud_agentrun20250910 import models as main_models
|
|
8
|
+
from darabonba.model import DaraModel
|
|
9
|
+
|
|
10
|
+
class CreateKnowledgeBaseResponse(DaraModel):
|
|
11
|
+
def __init__(
|
|
12
|
+
self,
|
|
13
|
+
headers: Dict[str, str] = None,
|
|
14
|
+
status_code: int = None,
|
|
15
|
+
body: main_models.KnowledgeBaseResult = None,
|
|
16
|
+
):
|
|
17
|
+
self.headers = headers
|
|
18
|
+
self.status_code = status_code
|
|
19
|
+
self.body = body
|
|
20
|
+
|
|
21
|
+
def validate(self):
|
|
22
|
+
if self.body:
|
|
23
|
+
self.body.validate()
|
|
24
|
+
|
|
25
|
+
def to_map(self):
|
|
26
|
+
result = dict()
|
|
27
|
+
_map = super().to_map()
|
|
28
|
+
if _map is not None:
|
|
29
|
+
result = _map
|
|
30
|
+
if self.headers is not None:
|
|
31
|
+
result['headers'] = self.headers
|
|
32
|
+
|
|
33
|
+
if self.status_code is not None:
|
|
34
|
+
result['statusCode'] = self.status_code
|
|
35
|
+
|
|
36
|
+
if self.body is not None:
|
|
37
|
+
result['body'] = self.body.to_map()
|
|
38
|
+
|
|
39
|
+
return result
|
|
40
|
+
|
|
41
|
+
def from_map(self, m: dict = None):
|
|
42
|
+
m = m or dict()
|
|
43
|
+
if m.get('headers') is not None:
|
|
44
|
+
self.headers = m.get('headers')
|
|
45
|
+
|
|
46
|
+
if m.get('statusCode') is not None:
|
|
47
|
+
self.status_code = m.get('statusCode')
|
|
48
|
+
|
|
49
|
+
if m.get('body') is not None:
|
|
50
|
+
temp_model = main_models.KnowledgeBaseResult()
|
|
51
|
+
self.body = temp_model.from_map(m.get('body'))
|
|
52
|
+
|
|
53
|
+
return self
|
|
54
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from alibabacloud_agentrun20250910 import models as main_models
|
|
6
|
+
from darabonba.model import DaraModel
|
|
7
|
+
|
|
8
|
+
class CreateMemoryCollectionInput(DaraModel):
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
description: str = None,
|
|
12
|
+
embedder_config: main_models.EmbedderConfig = None,
|
|
13
|
+
execution_role_arn: str = None,
|
|
14
|
+
llm_config: main_models.LLMConfig = None,
|
|
15
|
+
memory_collection_name: str = None,
|
|
16
|
+
network_configuration: main_models.NetworkConfiguration = None,
|
|
17
|
+
type: str = None,
|
|
18
|
+
vector_store_config: main_models.VectorStoreConfig = None,
|
|
19
|
+
):
|
|
20
|
+
self.description = description
|
|
21
|
+
self.embedder_config = embedder_config
|
|
22
|
+
self.execution_role_arn = execution_role_arn
|
|
23
|
+
self.llm_config = llm_config
|
|
24
|
+
self.memory_collection_name = memory_collection_name
|
|
25
|
+
self.network_configuration = network_configuration
|
|
26
|
+
self.type = type
|
|
27
|
+
self.vector_store_config = vector_store_config
|
|
28
|
+
|
|
29
|
+
def validate(self):
|
|
30
|
+
if self.embedder_config:
|
|
31
|
+
self.embedder_config.validate()
|
|
32
|
+
if self.llm_config:
|
|
33
|
+
self.llm_config.validate()
|
|
34
|
+
if self.network_configuration:
|
|
35
|
+
self.network_configuration.validate()
|
|
36
|
+
if self.vector_store_config:
|
|
37
|
+
self.vector_store_config.validate()
|
|
38
|
+
|
|
39
|
+
def to_map(self):
|
|
40
|
+
result = dict()
|
|
41
|
+
_map = super().to_map()
|
|
42
|
+
if _map is not None:
|
|
43
|
+
result = _map
|
|
44
|
+
if self.description is not None:
|
|
45
|
+
result['description'] = self.description
|
|
46
|
+
|
|
47
|
+
if self.embedder_config is not None:
|
|
48
|
+
result['embedderConfig'] = self.embedder_config.to_map()
|
|
49
|
+
|
|
50
|
+
if self.execution_role_arn is not None:
|
|
51
|
+
result['executionRoleArn'] = self.execution_role_arn
|
|
52
|
+
|
|
53
|
+
if self.llm_config is not None:
|
|
54
|
+
result['llmConfig'] = self.llm_config.to_map()
|
|
55
|
+
|
|
56
|
+
if self.memory_collection_name is not None:
|
|
57
|
+
result['memoryCollectionName'] = self.memory_collection_name
|
|
58
|
+
|
|
59
|
+
if self.network_configuration is not None:
|
|
60
|
+
result['networkConfiguration'] = self.network_configuration.to_map()
|
|
61
|
+
|
|
62
|
+
if self.type is not None:
|
|
63
|
+
result['type'] = self.type
|
|
64
|
+
|
|
65
|
+
if self.vector_store_config is not None:
|
|
66
|
+
result['vectorStoreConfig'] = self.vector_store_config.to_map()
|
|
67
|
+
|
|
68
|
+
return result
|
|
69
|
+
|
|
70
|
+
def from_map(self, m: dict = None):
|
|
71
|
+
m = m or dict()
|
|
72
|
+
if m.get('description') is not None:
|
|
73
|
+
self.description = m.get('description')
|
|
74
|
+
|
|
75
|
+
if m.get('embedderConfig') is not None:
|
|
76
|
+
temp_model = main_models.EmbedderConfig()
|
|
77
|
+
self.embedder_config = temp_model.from_map(m.get('embedderConfig'))
|
|
78
|
+
|
|
79
|
+
if m.get('executionRoleArn') is not None:
|
|
80
|
+
self.execution_role_arn = m.get('executionRoleArn')
|
|
81
|
+
|
|
82
|
+
if m.get('llmConfig') is not None:
|
|
83
|
+
temp_model = main_models.LLMConfig()
|
|
84
|
+
self.llm_config = temp_model.from_map(m.get('llmConfig'))
|
|
85
|
+
|
|
86
|
+
if m.get('memoryCollectionName') is not None:
|
|
87
|
+
self.memory_collection_name = m.get('memoryCollectionName')
|
|
88
|
+
|
|
89
|
+
if m.get('networkConfiguration') is not None:
|
|
90
|
+
temp_model = main_models.NetworkConfiguration()
|
|
91
|
+
self.network_configuration = temp_model.from_map(m.get('networkConfiguration'))
|
|
92
|
+
|
|
93
|
+
if m.get('type') is not None:
|
|
94
|
+
self.type = m.get('type')
|
|
95
|
+
|
|
96
|
+
if m.get('vectorStoreConfig') is not None:
|
|
97
|
+
temp_model = main_models.VectorStoreConfig()
|
|
98
|
+
self.vector_store_config = temp_model.from_map(m.get('vectorStoreConfig'))
|
|
99
|
+
|
|
100
|
+
return self
|
|
101
|
+
|
|
@@ -12,6 +12,7 @@ class CustomDomain(DaraModel):
|
|
|
12
12
|
created_at: str = None,
|
|
13
13
|
description: str = None,
|
|
14
14
|
domain_name: str = None,
|
|
15
|
+
domain_type: str = None,
|
|
15
16
|
protocol: str = None,
|
|
16
17
|
route_config: main_models.RouteConfig = None,
|
|
17
18
|
tls_config: main_models.TLSConfig = None,
|
|
@@ -25,6 +26,7 @@ class CustomDomain(DaraModel):
|
|
|
25
26
|
self.description = description
|
|
26
27
|
# 域名。填写已在阿里云备案或接入备案的自定义域名名称。
|
|
27
28
|
self.domain_name = domain_name
|
|
29
|
+
self.domain_type = domain_type
|
|
28
30
|
# 域名支持的协议类型:● HTTP:仅支持 HTTP 协议。● HTTPS:仅支持 HTTPS 协议。● HTTP,HTTPS:支持 HTTP 及 HTTPS 协议。
|
|
29
31
|
self.protocol = protocol
|
|
30
32
|
# 路由表:自定义域名访问时的 PATH 到 资源 的映射。
|
|
@@ -59,6 +61,9 @@ class CustomDomain(DaraModel):
|
|
|
59
61
|
if self.domain_name is not None:
|
|
60
62
|
result['domainName'] = self.domain_name
|
|
61
63
|
|
|
64
|
+
if self.domain_type is not None:
|
|
65
|
+
result['domainType'] = self.domain_type
|
|
66
|
+
|
|
62
67
|
if self.protocol is not None:
|
|
63
68
|
result['protocol'] = self.protocol
|
|
64
69
|
|
|
@@ -88,6 +93,9 @@ class CustomDomain(DaraModel):
|
|
|
88
93
|
if m.get('domainName') is not None:
|
|
89
94
|
self.domain_name = m.get('domainName')
|
|
90
95
|
|
|
96
|
+
if m.get('domainType') is not None:
|
|
97
|
+
self.domain_type = m.get('domainType')
|
|
98
|
+
|
|
91
99
|
if m.get('protocol') is not None:
|
|
92
100
|
self.protocol = m.get('protocol')
|
|
93
101
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
|
|
7
|
+
from alibabacloud_agentrun20250910 import models as main_models
|
|
8
|
+
from darabonba.model import DaraModel
|
|
9
|
+
|
|
10
|
+
class DeleteKnowledgeBaseResponse(DaraModel):
|
|
11
|
+
def __init__(
|
|
12
|
+
self,
|
|
13
|
+
headers: Dict[str, str] = None,
|
|
14
|
+
status_code: int = None,
|
|
15
|
+
body: main_models.KnowledgeBaseResult = None,
|
|
16
|
+
):
|
|
17
|
+
self.headers = headers
|
|
18
|
+
self.status_code = status_code
|
|
19
|
+
self.body = body
|
|
20
|
+
|
|
21
|
+
def validate(self):
|
|
22
|
+
if self.body:
|
|
23
|
+
self.body.validate()
|
|
24
|
+
|
|
25
|
+
def to_map(self):
|
|
26
|
+
result = dict()
|
|
27
|
+
_map = super().to_map()
|
|
28
|
+
if _map is not None:
|
|
29
|
+
result = _map
|
|
30
|
+
if self.headers is not None:
|
|
31
|
+
result['headers'] = self.headers
|
|
32
|
+
|
|
33
|
+
if self.status_code is not None:
|
|
34
|
+
result['statusCode'] = self.status_code
|
|
35
|
+
|
|
36
|
+
if self.body is not None:
|
|
37
|
+
result['body'] = self.body.to_map()
|
|
38
|
+
|
|
39
|
+
return result
|
|
40
|
+
|
|
41
|
+
def from_map(self, m: dict = None):
|
|
42
|
+
m = m or dict()
|
|
43
|
+
if m.get('headers') is not None:
|
|
44
|
+
self.headers = m.get('headers')
|
|
45
|
+
|
|
46
|
+
if m.get('statusCode') is not None:
|
|
47
|
+
self.status_code = m.get('statusCode')
|
|
48
|
+
|
|
49
|
+
if m.get('body') is not None:
|
|
50
|
+
temp_model = main_models.KnowledgeBaseResult()
|
|
51
|
+
self.body = temp_model.from_map(m.get('body'))
|
|
52
|
+
|
|
53
|
+
return self
|
|
54
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from alibabacloud_agentrun20250910 import models as main_models
|
|
6
|
+
from darabonba.model import DaraModel
|
|
7
|
+
|
|
8
|
+
class DeleteKnowledgeBaseResult(DaraModel):
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
code: str = None,
|
|
12
|
+
data: main_models.KnowledgeBase = None,
|
|
13
|
+
request_id: str = None,
|
|
14
|
+
):
|
|
15
|
+
self.code = code
|
|
16
|
+
self.data = data
|
|
17
|
+
self.request_id = request_id
|
|
18
|
+
|
|
19
|
+
def validate(self):
|
|
20
|
+
if self.data:
|
|
21
|
+
self.data.validate()
|
|
22
|
+
|
|
23
|
+
def to_map(self):
|
|
24
|
+
result = dict()
|
|
25
|
+
_map = super().to_map()
|
|
26
|
+
if _map is not None:
|
|
27
|
+
result = _map
|
|
28
|
+
if self.code is not None:
|
|
29
|
+
result['code'] = self.code
|
|
30
|
+
|
|
31
|
+
if self.data is not None:
|
|
32
|
+
result['data'] = self.data.to_map()
|
|
33
|
+
|
|
34
|
+
if self.request_id is not None:
|
|
35
|
+
result['requestId'] = self.request_id
|
|
36
|
+
|
|
37
|
+
return result
|
|
38
|
+
|
|
39
|
+
def from_map(self, m: dict = None):
|
|
40
|
+
m = m or dict()
|
|
41
|
+
if m.get('code') is not None:
|
|
42
|
+
self.code = m.get('code')
|
|
43
|
+
|
|
44
|
+
if m.get('data') is not None:
|
|
45
|
+
temp_model = main_models.KnowledgeBase()
|
|
46
|
+
self.data = temp_model.from_map(m.get('data'))
|
|
47
|
+
|
|
48
|
+
if m.get('requestId') is not None:
|
|
49
|
+
self.request_id = m.get('requestId')
|
|
50
|
+
|
|
51
|
+
return self
|
|
52
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from alibabacloud_agentrun20250910 import models as main_models
|
|
6
|
+
from darabonba.model import DaraModel
|
|
7
|
+
|
|
8
|
+
class EmbedderConfig(DaraModel):
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
config: main_models.EmbedderConfigConfig = None,
|
|
12
|
+
model_service_name: str = None,
|
|
13
|
+
):
|
|
14
|
+
self.config = config
|
|
15
|
+
self.model_service_name = model_service_name
|
|
16
|
+
|
|
17
|
+
def validate(self):
|
|
18
|
+
if self.config:
|
|
19
|
+
self.config.validate()
|
|
20
|
+
|
|
21
|
+
def to_map(self):
|
|
22
|
+
result = dict()
|
|
23
|
+
_map = super().to_map()
|
|
24
|
+
if _map is not None:
|
|
25
|
+
result = _map
|
|
26
|
+
if self.config is not None:
|
|
27
|
+
result['config'] = self.config.to_map()
|
|
28
|
+
|
|
29
|
+
if self.model_service_name is not None:
|
|
30
|
+
result['modelServiceName'] = self.model_service_name
|
|
31
|
+
|
|
32
|
+
return result
|
|
33
|
+
|
|
34
|
+
def from_map(self, m: dict = None):
|
|
35
|
+
m = m or dict()
|
|
36
|
+
if m.get('config') is not None:
|
|
37
|
+
temp_model = main_models.EmbedderConfigConfig()
|
|
38
|
+
self.config = temp_model.from_map(m.get('config'))
|
|
39
|
+
|
|
40
|
+
if m.get('modelServiceName') is not None:
|
|
41
|
+
self.model_service_name = m.get('modelServiceName')
|
|
42
|
+
|
|
43
|
+
return self
|
|
44
|
+
|
|
45
|
+
class EmbedderConfigConfig(DaraModel):
|
|
46
|
+
def __init__(
|
|
47
|
+
self,
|
|
48
|
+
model: str = None,
|
|
49
|
+
):
|
|
50
|
+
self.model = model
|
|
51
|
+
|
|
52
|
+
def validate(self):
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
def to_map(self):
|
|
56
|
+
result = dict()
|
|
57
|
+
_map = super().to_map()
|
|
58
|
+
if _map is not None:
|
|
59
|
+
result = _map
|
|
60
|
+
if self.model is not None:
|
|
61
|
+
result['model'] = self.model
|
|
62
|
+
|
|
63
|
+
return result
|
|
64
|
+
|
|
65
|
+
def from_map(self, m: dict = None):
|
|
66
|
+
m = m or dict()
|
|
67
|
+
if m.get('model') is not None:
|
|
68
|
+
self.model = m.get('model')
|
|
69
|
+
|
|
70
|
+
return self
|
|
71
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
|
|
7
|
+
from alibabacloud_agentrun20250910 import models as main_models
|
|
8
|
+
from darabonba.model import DaraModel
|
|
9
|
+
|
|
10
|
+
class GetKnowledgeBaseResponse(DaraModel):
|
|
11
|
+
def __init__(
|
|
12
|
+
self,
|
|
13
|
+
headers: Dict[str, str] = None,
|
|
14
|
+
status_code: int = None,
|
|
15
|
+
body: main_models.KnowledgeBaseResult = None,
|
|
16
|
+
):
|
|
17
|
+
self.headers = headers
|
|
18
|
+
self.status_code = status_code
|
|
19
|
+
self.body = body
|
|
20
|
+
|
|
21
|
+
def validate(self):
|
|
22
|
+
if self.body:
|
|
23
|
+
self.body.validate()
|
|
24
|
+
|
|
25
|
+
def to_map(self):
|
|
26
|
+
result = dict()
|
|
27
|
+
_map = super().to_map()
|
|
28
|
+
if _map is not None:
|
|
29
|
+
result = _map
|
|
30
|
+
if self.headers is not None:
|
|
31
|
+
result['headers'] = self.headers
|
|
32
|
+
|
|
33
|
+
if self.status_code is not None:
|
|
34
|
+
result['statusCode'] = self.status_code
|
|
35
|
+
|
|
36
|
+
if self.body is not None:
|
|
37
|
+
result['body'] = self.body.to_map()
|
|
38
|
+
|
|
39
|
+
return result
|
|
40
|
+
|
|
41
|
+
def from_map(self, m: dict = None):
|
|
42
|
+
m = m or dict()
|
|
43
|
+
if m.get('headers') is not None:
|
|
44
|
+
self.headers = m.get('headers')
|
|
45
|
+
|
|
46
|
+
if m.get('statusCode') is not None:
|
|
47
|
+
self.status_code = m.get('statusCode')
|
|
48
|
+
|
|
49
|
+
if m.get('body') is not None:
|
|
50
|
+
temp_model = main_models.KnowledgeBaseResult()
|
|
51
|
+
self.body = temp_model.from_map(m.get('body'))
|
|
52
|
+
|
|
53
|
+
return self
|
|
54
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Any
|
|
6
|
+
|
|
7
|
+
from darabonba.model import DaraModel
|
|
8
|
+
|
|
9
|
+
class KnowledgeBase(DaraModel):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
created_at: str = None,
|
|
13
|
+
credential_name: str = None,
|
|
14
|
+
description: str = None,
|
|
15
|
+
knowledge_base_id: str = None,
|
|
16
|
+
knowledge_base_name: str = None,
|
|
17
|
+
last_updated_at: str = None,
|
|
18
|
+
provider: str = None,
|
|
19
|
+
provider_settings: Dict[str, Any] = None,
|
|
20
|
+
retrieve_settings: Dict[str, Any] = None,
|
|
21
|
+
):
|
|
22
|
+
self.created_at = created_at
|
|
23
|
+
self.credential_name = credential_name
|
|
24
|
+
self.description = description
|
|
25
|
+
self.knowledge_base_id = knowledge_base_id
|
|
26
|
+
self.knowledge_base_name = knowledge_base_name
|
|
27
|
+
self.last_updated_at = last_updated_at
|
|
28
|
+
self.provider = provider
|
|
29
|
+
self.provider_settings = provider_settings
|
|
30
|
+
self.retrieve_settings = retrieve_settings
|
|
31
|
+
|
|
32
|
+
def validate(self):
|
|
33
|
+
pass
|
|
34
|
+
|
|
35
|
+
def to_map(self):
|
|
36
|
+
result = dict()
|
|
37
|
+
_map = super().to_map()
|
|
38
|
+
if _map is not None:
|
|
39
|
+
result = _map
|
|
40
|
+
if self.created_at is not None:
|
|
41
|
+
result['createdAt'] = self.created_at
|
|
42
|
+
|
|
43
|
+
if self.credential_name is not None:
|
|
44
|
+
result['credentialName'] = self.credential_name
|
|
45
|
+
|
|
46
|
+
if self.description is not None:
|
|
47
|
+
result['description'] = self.description
|
|
48
|
+
|
|
49
|
+
if self.knowledge_base_id is not None:
|
|
50
|
+
result['knowledgeBaseId'] = self.knowledge_base_id
|
|
51
|
+
|
|
52
|
+
if self.knowledge_base_name is not None:
|
|
53
|
+
result['knowledgeBaseName'] = self.knowledge_base_name
|
|
54
|
+
|
|
55
|
+
if self.last_updated_at is not None:
|
|
56
|
+
result['lastUpdatedAt'] = self.last_updated_at
|
|
57
|
+
|
|
58
|
+
if self.provider is not None:
|
|
59
|
+
result['provider'] = self.provider
|
|
60
|
+
|
|
61
|
+
if self.provider_settings is not None:
|
|
62
|
+
result['providerSettings'] = self.provider_settings
|
|
63
|
+
|
|
64
|
+
if self.retrieve_settings is not None:
|
|
65
|
+
result['retrieveSettings'] = self.retrieve_settings
|
|
66
|
+
|
|
67
|
+
return result
|
|
68
|
+
|
|
69
|
+
def from_map(self, m: dict = None):
|
|
70
|
+
m = m or dict()
|
|
71
|
+
if m.get('createdAt') is not None:
|
|
72
|
+
self.created_at = m.get('createdAt')
|
|
73
|
+
|
|
74
|
+
if m.get('credentialName') is not None:
|
|
75
|
+
self.credential_name = m.get('credentialName')
|
|
76
|
+
|
|
77
|
+
if m.get('description') is not None:
|
|
78
|
+
self.description = m.get('description')
|
|
79
|
+
|
|
80
|
+
if m.get('knowledgeBaseId') is not None:
|
|
81
|
+
self.knowledge_base_id = m.get('knowledgeBaseId')
|
|
82
|
+
|
|
83
|
+
if m.get('knowledgeBaseName') is not None:
|
|
84
|
+
self.knowledge_base_name = m.get('knowledgeBaseName')
|
|
85
|
+
|
|
86
|
+
if m.get('lastUpdatedAt') is not None:
|
|
87
|
+
self.last_updated_at = m.get('lastUpdatedAt')
|
|
88
|
+
|
|
89
|
+
if m.get('provider') is not None:
|
|
90
|
+
self.provider = m.get('provider')
|
|
91
|
+
|
|
92
|
+
if m.get('providerSettings') is not None:
|
|
93
|
+
self.provider_settings = m.get('providerSettings')
|
|
94
|
+
|
|
95
|
+
if m.get('retrieveSettings') is not None:
|
|
96
|
+
self.retrieve_settings = m.get('retrieveSettings')
|
|
97
|
+
|
|
98
|
+
return self
|
|
99
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from alibabacloud_agentrun20250910 import models as main_models
|
|
6
|
+
from darabonba.model import DaraModel
|
|
7
|
+
|
|
8
|
+
class KnowledgeBaseResult(DaraModel):
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
code: str = None,
|
|
12
|
+
data: main_models.KnowledgeBase = None,
|
|
13
|
+
request_id: str = None,
|
|
14
|
+
):
|
|
15
|
+
self.code = code
|
|
16
|
+
self.data = data
|
|
17
|
+
self.request_id = request_id
|
|
18
|
+
|
|
19
|
+
def validate(self):
|
|
20
|
+
if self.data:
|
|
21
|
+
self.data.validate()
|
|
22
|
+
|
|
23
|
+
def to_map(self):
|
|
24
|
+
result = dict()
|
|
25
|
+
_map = super().to_map()
|
|
26
|
+
if _map is not None:
|
|
27
|
+
result = _map
|
|
28
|
+
if self.code is not None:
|
|
29
|
+
result['code'] = self.code
|
|
30
|
+
|
|
31
|
+
if self.data is not None:
|
|
32
|
+
result['data'] = self.data.to_map()
|
|
33
|
+
|
|
34
|
+
if self.request_id is not None:
|
|
35
|
+
result['requestId'] = self.request_id
|
|
36
|
+
|
|
37
|
+
return result
|
|
38
|
+
|
|
39
|
+
def from_map(self, m: dict = None):
|
|
40
|
+
m = m or dict()
|
|
41
|
+
if m.get('code') is not None:
|
|
42
|
+
self.code = m.get('code')
|
|
43
|
+
|
|
44
|
+
if m.get('data') is not None:
|
|
45
|
+
temp_model = main_models.KnowledgeBase()
|
|
46
|
+
self.data = temp_model.from_map(m.get('data'))
|
|
47
|
+
|
|
48
|
+
if m.get('requestId') is not None:
|
|
49
|
+
self.request_id = m.get('requestId')
|
|
50
|
+
|
|
51
|
+
return self
|
|
52
|
+
|