digitalkin 0.3.2.dev24__py3-none-any.whl → 0.3.2.dev26__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.
- digitalkin/__version__.py +1 -1
- digitalkin/models/module/tool_reference.py +34 -37
- {digitalkin-0.3.2.dev24.dist-info → digitalkin-0.3.2.dev26.dist-info}/METADATA +2 -2
- {digitalkin-0.3.2.dev24.dist-info → digitalkin-0.3.2.dev26.dist-info}/RECORD +7 -7
- {digitalkin-0.3.2.dev24.dist-info → digitalkin-0.3.2.dev26.dist-info}/WHEEL +0 -0
- {digitalkin-0.3.2.dev24.dist-info → digitalkin-0.3.2.dev26.dist-info}/licenses/LICENSE +0 -0
- {digitalkin-0.3.2.dev24.dist-info → digitalkin-0.3.2.dev26.dist-info}/top_level.txt +0 -0
digitalkin/__version__.py
CHANGED
|
@@ -22,7 +22,8 @@ class ToolReference(BaseModel):
|
|
|
22
22
|
selected_tools: list[SelectedTool] = Field(default=[], description="Tools selected by the user.")
|
|
23
23
|
setup_ids: list[str] = Field(default=[], description="Setup IDs for the user to choose from.")
|
|
24
24
|
module_ids: list[str] = Field(default=[], description="Module IDs for the user to choose from.")
|
|
25
|
-
|
|
25
|
+
tag_ids: list[str] = Field(default=[], description="Tag IDs for the user to choose from.")
|
|
26
|
+
categories: list[str] = Field(default=[], description="Categories for the user to choose from.")
|
|
26
27
|
max_tools: int = Field(default=0, description="Maximum tools to select. 0 for unlimited.")
|
|
27
28
|
min_tools: int = Field(default=0, description="Minimum tools to select. 0 for no minimum.")
|
|
28
29
|
|
|
@@ -57,58 +58,51 @@ class _ToolReferenceInputSchema:
|
|
|
57
58
|
self,
|
|
58
59
|
setup_ids: list[str],
|
|
59
60
|
module_ids: list[str],
|
|
60
|
-
|
|
61
|
+
tag_ids: list[str],
|
|
62
|
+
categories: list[str],
|
|
61
63
|
max_tools: int = 0,
|
|
62
64
|
min_tools: int = 0,
|
|
63
65
|
) -> None:
|
|
64
66
|
self.setup_ids = setup_ids
|
|
65
67
|
self.module_ids = module_ids
|
|
66
|
-
self.
|
|
68
|
+
self.tag_ids = tag_ids
|
|
67
69
|
self.max_tools = max_tools
|
|
68
70
|
self.min_tools = min_tools
|
|
71
|
+
self.categories = categories
|
|
69
72
|
|
|
70
73
|
def __get_pydantic_json_schema__( # noqa: PLW3201
|
|
71
74
|
self,
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
_schema: CoreSchema,
|
|
76
|
+
_handler: GetJsonSchemaHandler,
|
|
74
77
|
) -> JsonSchemaValue:
|
|
75
|
-
"""Generate JSON schema
|
|
76
|
-
|
|
77
|
-
Args:
|
|
78
|
-
schema: The core schema from Pydantic.
|
|
79
|
-
handler: Handler to generate JSON schema from core schema.
|
|
78
|
+
"""Generate JSON schema as array for UI, hiding ToolReference complexity.
|
|
80
79
|
|
|
81
80
|
Returns:
|
|
82
|
-
JSON schema
|
|
81
|
+
JSON schema as array with ui:widget toolSelect.
|
|
83
82
|
"""
|
|
84
|
-
json_schema =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"ui:options": {
|
|
99
|
-
"setup_ids": self.setup_ids,
|
|
100
|
-
"module_ids": self.module_ids,
|
|
101
|
-
"tags": self.tags,
|
|
102
|
-
"max_tools": self.max_tools,
|
|
103
|
-
"min_tools": self.min_tools,
|
|
104
|
-
},
|
|
83
|
+
json_schema: dict[str, object] = {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {"type": "string"},
|
|
86
|
+
}
|
|
87
|
+
if self.max_tools > 0:
|
|
88
|
+
json_schema["maxItems"] = self.max_tools
|
|
89
|
+
if self.min_tools > 0:
|
|
90
|
+
json_schema["minItems"] = self.min_tools
|
|
91
|
+
json_schema["ui:widget"] = "toolSelect"
|
|
92
|
+
json_schema["ui:options"] = {
|
|
93
|
+
"setupIds": self.setup_ids,
|
|
94
|
+
"moduleIds": self.module_ids,
|
|
95
|
+
"tagIds": self.tag_ids,
|
|
96
|
+
"categories": self.categories,
|
|
105
97
|
}
|
|
98
|
+
return json_schema
|
|
106
99
|
|
|
107
100
|
|
|
108
101
|
def tool_reference_input(
|
|
109
102
|
setup_ids: list[str] = [],
|
|
110
103
|
module_ids: list[str] = [],
|
|
111
|
-
|
|
104
|
+
tag_ids: list[str] = [],
|
|
105
|
+
categories: list[str] = [],
|
|
112
106
|
max_tools: int = 0,
|
|
113
107
|
min_tools: int = 0,
|
|
114
108
|
) -> type[ToolReference]:
|
|
@@ -117,7 +111,8 @@ def tool_reference_input(
|
|
|
117
111
|
Args:
|
|
118
112
|
setup_ids: Setup IDs for the user to choose from.
|
|
119
113
|
module_ids: Module IDs for the user to choose from.
|
|
120
|
-
|
|
114
|
+
tag_ids: Tag IDs for the user to choose from.
|
|
115
|
+
categories: Categories for the user to choose from.
|
|
121
116
|
max_tools: Maximum tools allowed. 0 for unlimited.
|
|
122
117
|
min_tools: Minimum tools required. 0 for no minimum.
|
|
123
118
|
|
|
@@ -126,7 +121,7 @@ def tool_reference_input(
|
|
|
126
121
|
"""
|
|
127
122
|
|
|
128
123
|
def convert_to_tool_reference(v: object) -> ToolReference | object:
|
|
129
|
-
"""Convert list of setup IDs to ToolReference
|
|
124
|
+
"""Convert list of setup IDs to ToolReference.
|
|
130
125
|
|
|
131
126
|
Returns:
|
|
132
127
|
ToolReference if input is list, otherwise original value.
|
|
@@ -136,7 +131,8 @@ def tool_reference_input(
|
|
|
136
131
|
selected_tools=[SelectedTool(setup_id=sid, slug=sid) for sid in v],
|
|
137
132
|
setup_ids=setup_ids,
|
|
138
133
|
module_ids=module_ids,
|
|
139
|
-
|
|
134
|
+
tag_ids=tag_ids,
|
|
135
|
+
categories=categories,
|
|
140
136
|
max_tools=max_tools,
|
|
141
137
|
min_tools=min_tools,
|
|
142
138
|
)
|
|
@@ -167,7 +163,8 @@ def tool_reference_input(
|
|
|
167
163
|
_ToolReferenceInputSchema(
|
|
168
164
|
setup_ids=setup_ids,
|
|
169
165
|
module_ids=module_ids,
|
|
170
|
-
|
|
166
|
+
tag_ids=tag_ids,
|
|
167
|
+
categories=categories,
|
|
171
168
|
max_tools=max_tools,
|
|
172
169
|
min_tools=min_tools,
|
|
173
170
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: digitalkin
|
|
3
|
-
Version: 0.3.2.
|
|
3
|
+
Version: 0.3.2.dev26
|
|
4
4
|
Summary: SDK to build kin used in DigitalKin
|
|
5
5
|
Author-email: "DigitalKin.ai" <contact@digitalkin.ai>
|
|
6
6
|
License: Attribution-NonCommercial-ShareAlike 4.0 International
|
|
@@ -434,8 +434,8 @@ License: Attribution-NonCommercial-ShareAlike 4.0 International
|
|
|
434
434
|
Creative Commons may be contacted at creativecommons.org.
|
|
435
435
|
https://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
436
436
|
|
|
437
|
-
Project-URL: Homepage, https://github.com/DigitalKin-ai/digitalkin
|
|
438
437
|
Project-URL: Documentation, https://github.com/DigitalKin-ai/digitalkin
|
|
438
|
+
Project-URL: Homepage, https://github.com/DigitalKin-ai/digitalkin
|
|
439
439
|
Project-URL: Issues, https://github.com/DigitalKin-ai/digitalkin/issues
|
|
440
440
|
Keywords: agent,digitalkin,gprc,kin,sdk
|
|
441
441
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -7,7 +7,7 @@ base_server/mock/__init__.py,sha256=YZFT-F1l_TpvJYuIPX-7kTeE1CfOjhx9YmNRXVoi-jQ,
|
|
|
7
7
|
base_server/mock/mock_pb2.py,sha256=sETakcS3PAAm4E-hTCV1jIVaQTPEAIoVVHupB8Z_k7Y,1843
|
|
8
8
|
base_server/mock/mock_pb2_grpc.py,sha256=BbOT70H6q3laKgkHfOx1QdfmCS_HxCY4wCOX84YAdG4,3180
|
|
9
9
|
digitalkin/__init__.py,sha256=7LLBAba0th-3SGqcpqFO-lopWdUkVLKzLZiMtB-mW3M,162
|
|
10
|
-
digitalkin/__version__.py,sha256=
|
|
10
|
+
digitalkin/__version__.py,sha256=HpFcv-O69nogjhoQ6hsQe8S_Ym7hd5mJwWVtxQRO0to,196
|
|
11
11
|
digitalkin/logger.py,sha256=8ze_tjt2G6mDTuQcsf7-UTXWP3UHZ7LZVSs_iqF4rX4,4685
|
|
12
12
|
digitalkin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
digitalkin/core/__init__.py,sha256=FJRcJ-B1Viyn-38L8XpOpZ8KOnf1I7PCDOAmKXLQhqc,71
|
|
@@ -57,7 +57,7 @@ digitalkin/models/module/module_context.py,sha256=kwaAobsA82Du6L0XH9Is9u6Qj1rEjh
|
|
|
57
57
|
digitalkin/models/module/module_types.py,sha256=C9azCNBk76xMa-Mww8_6AiwQR8MLAsEyUOvBYxytovI,739
|
|
58
58
|
digitalkin/models/module/setup_types.py,sha256=8xEI6DvCYBHSOsuoeuZjtBL5rPsR_7DwWFxQnn2bo3c,19249
|
|
59
59
|
digitalkin/models/module/tool_cache.py,sha256=xAMSyY73aduYGPz6C54g0YMAa2OnXPN6QRS-W4TK_js,6568
|
|
60
|
-
digitalkin/models/module/tool_reference.py,sha256=
|
|
60
|
+
digitalkin/models/module/tool_reference.py,sha256=inizU9IkU_vxeyZxcK-JBqOloqTMvVSlj7-fot6syY4,6188
|
|
61
61
|
digitalkin/models/module/utility.py,sha256=gnbYfWpXGbomUI0fWf7T-Qm_VvT-LXDv1OuA9zObwVg,5589
|
|
62
62
|
digitalkin/models/services/__init__.py,sha256=jhfVw6egq0OcHmos_fypH9XFehbHTBw09wluVFVFEyw,226
|
|
63
63
|
digitalkin/models/services/cost.py,sha256=9PXvd5RrIk9vCrRjcUGQ9ZyAokEbwLg4s0RfnE-aLP4,1616
|
|
@@ -123,7 +123,7 @@ digitalkin/utils/dynamic_schema.py,sha256=y5csxjuqVHjWDpnTUzxbcUuI_wou9-ibRVHQlB
|
|
|
123
123
|
digitalkin/utils/llm_ready_schema.py,sha256=JjMug_lrQllqFoanaC091VgOqwAd-_YzcpqFlS7p778,2375
|
|
124
124
|
digitalkin/utils/package_discover.py,sha256=sa6Zp5Kape1Zr4iYiNrnZxiHDnqM06ODk6yfWHom53w,13465
|
|
125
125
|
digitalkin/utils/schema_splitter.py,sha256=f1RGzs0wSRPn8oydO9Ojo8mYTF4TFDkRFeGUt5jbPt4,11132
|
|
126
|
-
digitalkin-0.3.2.
|
|
126
|
+
digitalkin-0.3.2.dev26.dist-info/licenses/LICENSE,sha256=Ies4HFv2r2hzDRakJYxk3Y60uDFLiG-orIgeTpstnIo,20327
|
|
127
127
|
modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
128
128
|
modules/archetype_with_tools_module.py,sha256=kJkVhAFWG0aDDqzupOXOnV3l8j3z5bEdWos_6Z9rUP8,7303
|
|
129
129
|
modules/cpu_intensive_module.py,sha256=GZlirQDZdYuXrI46sv1q4RNAHZjL4EptHVQTvgK9zz8,8363
|
|
@@ -138,7 +138,7 @@ monitoring/digitalkin_observability/prometheus.py,sha256=gDmM9ySaVwPAe7Yg84pLxmE
|
|
|
138
138
|
monitoring/tests/test_metrics.py,sha256=ugnYfAwqBPO6zA8z4afKTlyBWECTivacYSN-URQCn2E,5856
|
|
139
139
|
services/filesystem_module.py,sha256=U4dgqtuDadaXz8PJ1d_uQ_1EPncBqudAQCLUICF9yL4,7421
|
|
140
140
|
services/storage_module.py,sha256=Wz2MzLvqs2D_bnBBgtnujYcAKK2V2KFMk8K21RoepSE,6972
|
|
141
|
-
digitalkin-0.3.2.
|
|
142
|
-
digitalkin-0.3.2.
|
|
143
|
-
digitalkin-0.3.2.
|
|
144
|
-
digitalkin-0.3.2.
|
|
141
|
+
digitalkin-0.3.2.dev26.dist-info/METADATA,sha256=DsDpAG8N_ZP2wt9WmfTRHgfbR9rpOyuJtmSHKHBRIwg,29725
|
|
142
|
+
digitalkin-0.3.2.dev26.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
143
|
+
digitalkin-0.3.2.dev26.dist-info/top_level.txt,sha256=AYVIesKrO0jnedQ-Muog9JBehG81WeTCNeOFoJgwsgE,51
|
|
144
|
+
digitalkin-0.3.2.dev26.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|