meshagent-tools 0.21.0__py3-none-any.whl → 0.22.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.
- meshagent/tools/database.py +27 -17
- meshagent/tools/version.py +1 -1
- {meshagent_tools-0.21.0.dist-info → meshagent_tools-0.22.0.dist-info}/METADATA +2 -2
- {meshagent_tools-0.21.0.dist-info → meshagent_tools-0.22.0.dist-info}/RECORD +7 -7
- {meshagent_tools-0.21.0.dist-info → meshagent_tools-0.22.0.dist-info}/WHEEL +0 -0
- {meshagent_tools-0.21.0.dist-info → meshagent_tools-0.22.0.dist-info}/licenses/LICENSE +0 -0
- {meshagent_tools-0.21.0.dist-info → meshagent_tools-0.22.0.dist-info}/top_level.txt +0 -0
meshagent/tools/database.py
CHANGED
|
@@ -130,16 +130,17 @@ class UpdateTool(Tool):
|
|
|
130
130
|
for k, v in schema.items():
|
|
131
131
|
columns += f"column {k} => {v.to_json()}"
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
"type": "object",
|
|
135
|
-
"required": [],
|
|
136
|
-
"additionalProperties": False,
|
|
137
|
-
"properties": {},
|
|
138
|
-
}
|
|
133
|
+
anyOf = []
|
|
139
134
|
|
|
140
135
|
for k, v in schema.items():
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
anyOf.append(
|
|
137
|
+
{
|
|
138
|
+
"type": "object",
|
|
139
|
+
"additionalProperties": False,
|
|
140
|
+
"required": [k],
|
|
141
|
+
"properties": {k: v.to_json_schema()},
|
|
142
|
+
}
|
|
143
|
+
)
|
|
143
144
|
|
|
144
145
|
input_schema = {
|
|
145
146
|
"type": "object",
|
|
@@ -153,7 +154,11 @@ class UpdateTool(Tool):
|
|
|
153
154
|
"type": "string",
|
|
154
155
|
"description": f"a lance db compatible filter, columns are: {columns}",
|
|
155
156
|
},
|
|
156
|
-
"values":
|
|
157
|
+
"values": {
|
|
158
|
+
"type": "array",
|
|
159
|
+
"description": "a list of columns to update",
|
|
160
|
+
"items": {"anyOf": anyOf},
|
|
161
|
+
},
|
|
157
162
|
},
|
|
158
163
|
}
|
|
159
164
|
|
|
@@ -164,9 +169,14 @@ class UpdateTool(Tool):
|
|
|
164
169
|
input_schema=input_schema,
|
|
165
170
|
)
|
|
166
171
|
|
|
167
|
-
async def execute(self, context: ToolContext, *, where: str, values: dict):
|
|
172
|
+
async def execute(self, context: ToolContext, *, where: str, values: list[dict]):
|
|
173
|
+
set = {}
|
|
174
|
+
for value in values:
|
|
175
|
+
for k, v in value.items():
|
|
176
|
+
set[k] = v
|
|
177
|
+
|
|
168
178
|
await context.room.database.update(
|
|
169
|
-
table=self.table, where=where, values=
|
|
179
|
+
table=self.table, where=where, values=set, namespace=self.namespace
|
|
170
180
|
)
|
|
171
181
|
|
|
172
182
|
return {"ok": True}
|
|
@@ -245,7 +255,7 @@ class SearchTool(Tool):
|
|
|
245
255
|
}
|
|
246
256
|
|
|
247
257
|
|
|
248
|
-
class
|
|
258
|
+
class LLMSearchTool(Tool):
|
|
249
259
|
def __init__(
|
|
250
260
|
self,
|
|
251
261
|
*,
|
|
@@ -490,7 +500,7 @@ class AdvancedSearchTool(Tool):
|
|
|
490
500
|
columns = ""
|
|
491
501
|
|
|
492
502
|
for k, v in schema.items():
|
|
493
|
-
columns += f"column {k} => {v.to_json()}"
|
|
503
|
+
columns += f"column {k} => {v.to_json()}\n"
|
|
494
504
|
|
|
495
505
|
input_schema = {
|
|
496
506
|
"type": "object",
|
|
@@ -580,9 +590,9 @@ class DatabaseToolkit(RemoteToolkit):
|
|
|
580
590
|
tools.append(
|
|
581
591
|
UpdateTool(table=table, schema=schema, namespace=namespace)
|
|
582
592
|
)
|
|
583
|
-
tools.append(
|
|
584
|
-
|
|
585
|
-
)
|
|
593
|
+
# tools.append(
|
|
594
|
+
# DeleteRowsTool(table=table, schema=schema, namespace=namespace)
|
|
595
|
+
# )
|
|
586
596
|
tools.append(
|
|
587
597
|
AdvancedDeleteRowsTool(
|
|
588
598
|
table=table, schema=schema, namespace=namespace
|
|
@@ -590,7 +600,7 @@ class DatabaseToolkit(RemoteToolkit):
|
|
|
590
600
|
)
|
|
591
601
|
|
|
592
602
|
tools.append(CountTool(table=table, schema=schema, namespace=namespace))
|
|
593
|
-
tools.append(SearchTool(table=table, schema=schema, namespace=namespace))
|
|
603
|
+
# tools.append(SearchTool(table=table, schema=schema, namespace=namespace))
|
|
594
604
|
tools.append(
|
|
595
605
|
AdvancedSearchTool(table=table, schema=schema, namespace=namespace)
|
|
596
606
|
)
|
meshagent/tools/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.22.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-tools
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.22.0
|
|
4
4
|
Summary: Tools for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
@@ -12,7 +12,7 @@ License-File: LICENSE
|
|
|
12
12
|
Requires-Dist: pyjwt~=2.10
|
|
13
13
|
Requires-Dist: pytest~=8.4
|
|
14
14
|
Requires-Dist: pytest-asyncio~=0.26
|
|
15
|
-
Requires-Dist: meshagent-api~=0.
|
|
15
|
+
Requires-Dist: meshagent-api~=0.22.0
|
|
16
16
|
Requires-Dist: aiohttp~=3.10
|
|
17
17
|
Requires-Dist: opentelemetry-distro~=0.54b1
|
|
18
18
|
Dynamic: license-file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
meshagent/tools/__init__.py,sha256=1zgD5OvAJP10eERoE72VbDu9hFVfAqCWUXw3SiCYFTE,1285
|
|
2
2
|
meshagent/tools/blob.py,sha256=aDW_z8R4HrmrYzAWoWm13Ypqcxcl4rL1Dc0ESnQETLM,1473
|
|
3
3
|
meshagent/tools/config.py,sha256=zH2xGxg28K7Tg-aYor6LXdzf0LRxS9iE0679H1FuWhE,79
|
|
4
|
-
meshagent/tools/database.py,sha256=
|
|
4
|
+
meshagent/tools/database.py,sha256=Jd_YJLPIBsypSK1SziwaYb8xKnG4oafoCDs6vzAC2Oc,18396
|
|
5
5
|
meshagent/tools/datetime.py,sha256=2pOUOWopYIsc5y4EoFo_1PdBaBcTSkeOOs_EqdqYTk0,17503
|
|
6
6
|
meshagent/tools/discovery.py,sha256=GZcC4XCgk0ftcYCBxuWlaIsLV5vU4-gXiu0HhlDUlwY,1861
|
|
7
7
|
meshagent/tools/document_tools.py,sha256=LMULXOSBjsvhKjqzxUxe8586t0Vol0v1Btu5v6ofm7A,11755
|
|
@@ -13,10 +13,10 @@ meshagent/tools/strict_schema.py,sha256=IytdAANa6lsfrsg5FsJuqYrxH9D_fayl-Lc9EwgL
|
|
|
13
13
|
meshagent/tools/tool.py,sha256=9OAlbfaHqfgJnCDBSW-8PS0Z1K1KjWGD3JBUyiHOxAk,3131
|
|
14
14
|
meshagent/tools/toolkit.py,sha256=rCCkpQBoSkmmhjnRGA4jx0QP-ds6WTJ0PkQVnf1Ls7s,3843
|
|
15
15
|
meshagent/tools/uuid.py,sha256=mzRwDmXy39U5lHhd9wqV4r-ZdS8jPfDTTs4UfW4KHJQ,1342
|
|
16
|
-
meshagent/tools/version.py,sha256
|
|
16
|
+
meshagent/tools/version.py,sha256=0kk8efeJF41FZIYweGTJylbizaWrp9W3qN78RClCWIU,23
|
|
17
17
|
meshagent/tools/web_toolkit.py,sha256=IoOYjOBmcbQsqWT14xYg02jjWpWmGOkDSxt2U-LQoaA,1258
|
|
18
|
-
meshagent_tools-0.
|
|
19
|
-
meshagent_tools-0.
|
|
20
|
-
meshagent_tools-0.
|
|
21
|
-
meshagent_tools-0.
|
|
22
|
-
meshagent_tools-0.
|
|
18
|
+
meshagent_tools-0.22.0.dist-info/licenses/LICENSE,sha256=eTt0SPW-sVNdkZe9PS_S8WfCIyLjRXRl7sUBWdlteFg,10254
|
|
19
|
+
meshagent_tools-0.22.0.dist-info/METADATA,sha256=3XOS3WMtZFuhAYiF7IpwiYnwtX9WgL8qr-GweleH108,2878
|
|
20
|
+
meshagent_tools-0.22.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
meshagent_tools-0.22.0.dist-info/top_level.txt,sha256=GlcXnHtRP6m7zlG3Df04M35OsHtNXy_DY09oFwWrH74,10
|
|
22
|
+
meshagent_tools-0.22.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|