pycityagent 2.0.0a38__py3-none-any.whl → 2.0.0a40__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.
- pycityagent/simulation/agentgroup.py +33 -4
- pycityagent/simulation/storage/pg.py +6 -1
- {pycityagent-2.0.0a38.dist-info → pycityagent-2.0.0a40.dist-info}/METADATA +1 -1
- {pycityagent-2.0.0a38.dist-info → pycityagent-2.0.0a40.dist-info}/RECORD +5 -5
- {pycityagent-2.0.0a38.dist-info → pycityagent-2.0.0a40.dist-info}/WHEEL +0 -0
@@ -199,11 +199,40 @@ class AgentGroup:
|
|
199
199
|
profile = profile[0]
|
200
200
|
profile["id"] = agent._uuid
|
201
201
|
profiles.append(
|
202
|
-
(
|
202
|
+
(
|
203
|
+
agent._uuid,
|
204
|
+
profile.get("name", ""),
|
205
|
+
json.dumps(
|
206
|
+
{
|
207
|
+
k: v
|
208
|
+
for k, v in profile.items()
|
209
|
+
if k not in {"id", "name"}
|
210
|
+
}
|
211
|
+
),
|
212
|
+
)
|
203
213
|
)
|
204
|
-
|
205
|
-
|
206
|
-
|
214
|
+
else:
|
215
|
+
profiles: list[Any] = []
|
216
|
+
for agent in self.agents:
|
217
|
+
profile = await agent.memory._profile.export()
|
218
|
+
profile = profile[0]
|
219
|
+
profile["id"] = agent._uuid
|
220
|
+
profiles.append(
|
221
|
+
(
|
222
|
+
agent._uuid,
|
223
|
+
profile.get("name", ""),
|
224
|
+
json.dumps(
|
225
|
+
{
|
226
|
+
k: v
|
227
|
+
for k, v in profile.items()
|
228
|
+
if k not in {"id", "name"}
|
229
|
+
}
|
230
|
+
),
|
231
|
+
)
|
232
|
+
)
|
233
|
+
await self._pgsql_writer.async_write_profile.remote( # type:ignore
|
234
|
+
profiles
|
235
|
+
)
|
207
236
|
self.initialized = True
|
208
237
|
logger.debug(f"-----AgentGroup {self._uuid} initialized")
|
209
238
|
|
@@ -139,7 +139,12 @@ class PgWriter:
|
|
139
139
|
exec_str = "SELECT * FROM {table_name} WHERE id=%s".format(
|
140
140
|
table_name=table_name
|
141
141
|
), (self.exp_id,)
|
142
|
-
await cur.execute(
|
142
|
+
await cur.execute(
|
143
|
+
"SELECT * FROM {table_name} WHERE id=%s".format(
|
144
|
+
table_name=table_name
|
145
|
+
),
|
146
|
+
(self.exp_id,),
|
147
|
+
) # type:ignore
|
143
148
|
logger.debug(f"table:{table_name} sql: {exec_str}")
|
144
149
|
record_exists = await cur.fetchall()
|
145
150
|
if record_exists:
|
@@ -50,9 +50,9 @@ pycityagent/metrics/__init__.py,sha256=X08PaBbGVAd7_PRGLREXWxaqm7nS82WBQpD1zvQzc
|
|
50
50
|
pycityagent/metrics/mlflow_client.py,sha256=g_tHxWkWTDijtbGL74-HmiYzWVKb1y8-w12QrY9jL30,4449
|
51
51
|
pycityagent/metrics/utils/const.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
52
|
pycityagent/simulation/__init__.py,sha256=P5czbcg2d8S0nbbnsQXFIhwzO4CennAhZM8OmKvAeYw,194
|
53
|
-
pycityagent/simulation/agentgroup.py,sha256=
|
53
|
+
pycityagent/simulation/agentgroup.py,sha256=ZPzgHgin-XOz3owxMbyAxcz8AiU4I6XM-ppOUsFsAIE,25284
|
54
54
|
pycityagent/simulation/simulation.py,sha256=aE-U9wEay9ksheSOotxyLfZOGxlKxP0OFOuRt3mDmSY,23246
|
55
|
-
pycityagent/simulation/storage/pg.py,sha256=
|
55
|
+
pycityagent/simulation/storage/pg.py,sha256=jjdYvqKmDms3weqALqOO__gxWF-Z0YcqeD85XbP4Qks,8455
|
56
56
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
57
57
|
pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
|
58
58
|
pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
|
@@ -70,6 +70,6 @@ pycityagent/workflow/block.py,sha256=C2aWdVRffb3LknP955GvPcBMsm3VPXN9ZuAtCgITFTo
|
|
70
70
|
pycityagent/workflow/prompt.py,sha256=6jI0Rq54JLv3-IXqZLYug62vse10wTI83xvf4ZX42nk,2929
|
71
71
|
pycityagent/workflow/tool.py,sha256=xADxhNgVsjNiMxlhdwn3xGUstFOkLEG8P67ez8VmwSI,8555
|
72
72
|
pycityagent/workflow/trigger.py,sha256=Df-MOBEDWBbM-v0dFLQLXteLsipymT4n8vqexmK2GiQ,5643
|
73
|
-
pycityagent-2.0.
|
74
|
-
pycityagent-2.0.
|
75
|
-
pycityagent-2.0.
|
73
|
+
pycityagent-2.0.0a40.dist-info/METADATA,sha256=ZgQbu-AdFrvCiiQJ0Cgs9dILTtHOIqs5VEMfbQ1SFn0,8046
|
74
|
+
pycityagent-2.0.0a40.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
75
|
+
pycityagent-2.0.0a40.dist-info/RECORD,,
|
File without changes
|