pycityagent 2.0.0a14__py3-none-any.whl → 2.0.0a16__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/__init__.py +14 -0
- pycityagent/agent.py +80 -63
- pycityagent/environment/simulator.py +5 -4
- pycityagent/memory/memory.py +8 -7
- pycityagent/memory/memory_base.py +6 -4
- pycityagent/message/messager.py +8 -7
- pycityagent/simulation/agentgroup.py +135 -51
- pycityagent/simulation/simulation.py +206 -92
- pycityagent/survey/manager.py +10 -14
- pycityagent/survey/models.py +24 -24
- pycityagent/utils/__init__.py +2 -2
- pycityagent/utils/avro_schema.py +26 -1
- pycityagent/workflow/tool.py +1 -4
- {pycityagent-2.0.0a14.dist-info → pycityagent-2.0.0a16.dist-info}/METADATA +3 -2
- {pycityagent-2.0.0a14.dist-info → pycityagent-2.0.0a16.dist-info}/RECORD +16 -16
- {pycityagent-2.0.0a14.dist-info → pycityagent-2.0.0a16.dist-info}/WHEEL +0 -0
pycityagent/workflow/tool.py
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
import asyncio
|
2
|
-
import logging
|
3
|
-
from copy import deepcopy
|
4
1
|
from typing import Any, Callable, Dict, List, Optional, Union
|
5
2
|
|
6
3
|
from ..agent import Agent
|
@@ -142,7 +139,7 @@ class UpdateWithSimulator(Tool):
|
|
142
139
|
if agent._simulator is None:
|
143
140
|
return
|
144
141
|
if not agent._has_bound_to_simulator:
|
145
|
-
await
|
142
|
+
await agent._bind_to_simulator() # type: ignore
|
146
143
|
simulator = agent.simulator
|
147
144
|
memory = agent.memory
|
148
145
|
person_id = await memory.get("id")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pycityagent
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0a16
|
4
4
|
Summary: LLM-based城市环境agent构建库
|
5
5
|
License: MIT
|
6
6
|
Author: Yuwei Yan
|
@@ -24,6 +24,7 @@ Requires-Dist: fastavro (>=1.10.0,<2.0.0)
|
|
24
24
|
Requires-Dist: geojson (==3.1.0)
|
25
25
|
Requires-Dist: gradio (>=5.7.1,<6.0.0)
|
26
26
|
Requires-Dist: grpcio (==1.67.1)
|
27
|
+
Requires-Dist: langchain-core (>=0.3.28,<0.4.0)
|
27
28
|
Requires-Dist: matplotlib (==3.8.3)
|
28
29
|
Requires-Dist: mosstool (==1.0.24)
|
29
30
|
Requires-Dist: networkx (==3.2.1)
|
@@ -33,7 +34,7 @@ Requires-Dist: pandavro (>=1.8.0,<2.0.0)
|
|
33
34
|
Requires-Dist: poetry (>=1.2.2)
|
34
35
|
Requires-Dist: protobuf (<=4.24.0)
|
35
36
|
Requires-Dist: pycitydata (==1.0.0)
|
36
|
-
Requires-Dist: pycityproto (
|
37
|
+
Requires-Dist: pycityproto (>=2.1.3,<3.0.0)
|
37
38
|
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
38
39
|
Requires-Dist: ray (>=2.40.0,<3.0.0)
|
39
40
|
Requires-Dist: sidecar (==0.7.0)
|
@@ -1,5 +1,5 @@
|
|
1
|
-
pycityagent/__init__.py,sha256=
|
2
|
-
pycityagent/agent.py,sha256=
|
1
|
+
pycityagent/__init__.py,sha256=EDxt3Su3lH1IMh9suNw7GeGL7UrXeWiZTw5KWNznDzc,637
|
2
|
+
pycityagent/agent.py,sha256=t9W9sKxtQ0EkMxL78kAjAu-rXigEK6gyLY0IEA4DbnQ,23143
|
3
3
|
pycityagent/economy/__init__.py,sha256=aonY4WHnx-6EGJ4WKrx4S-2jAkYNLtqUA04jp6q8B7w,75
|
4
4
|
pycityagent/economy/econ_client.py,sha256=wcuNtcpkSijJwNkt2mXw3SshYy4SBy6qbvJ0VQ7Aovo,10854
|
5
5
|
pycityagent/environment/__init__.py,sha256=awHxlOud-btWbk0FCS4RmGJ13W84oVCkbGfcrhKqihA,240
|
@@ -21,7 +21,7 @@ pycityagent/environment/sim/person_service.py,sha256=nIvOsoBoqOTDYtsiThg07-4ZBgk
|
|
21
21
|
pycityagent/environment/sim/road_service.py,sha256=phKTwTyhc_6Ht2mddEXpdENfl-lRXIVY0CHAlw1yHjI,1264
|
22
22
|
pycityagent/environment/sim/sim_env.py,sha256=HI1LcS_FotDKQ6vBnx0e49prXSABOfA20aU9KM-ZkCY,4625
|
23
23
|
pycityagent/environment/sim/social_service.py,sha256=6Iqvq6dz8H2jhLLdtaITc6Js9QnQw-Ylsd5AZgUj3-E,1993
|
24
|
-
pycityagent/environment/simulator.py,sha256=
|
24
|
+
pycityagent/environment/simulator.py,sha256=K7IyhiGC9BxanW28bpML4M0YREdMp1h7yMoWBlbf3RY,12504
|
25
25
|
pycityagent/environment/utils/__init__.py,sha256=1m4Q1EfGvNpUsa1bgQzzCyWhfkpElnskNImjjFD3Znc,237
|
26
26
|
pycityagent/environment/utils/base64.py,sha256=hoREzQo3FXMN79pqQLO2jgsDEvudciomyKii7MWljAM,374
|
27
27
|
pycityagent/environment/utils/const.py,sha256=3RMNy7_bE7-23K90j9DFW_tWEzu8s7hSTgKbV-3BFl4,5327
|
@@ -37,22 +37,22 @@ pycityagent/llm/llmconfig.py,sha256=4Ylf4OFSBEFy8jrOneeX0HvPhWEaF5jGvy1HkXK08Ro,
|
|
37
37
|
pycityagent/llm/utils.py,sha256=hoNPhvomb1u6lhFX0GctFipw74hVKb7bvUBDqwBzBYw,160
|
38
38
|
pycityagent/memory/__init__.py,sha256=Hs2NhYpIG-lvpwPWwj4DydB1sxtjz7cuA4iDAzCXnjI,243
|
39
39
|
pycityagent/memory/const.py,sha256=6zpJPJXWoH9-yf4RARYYff586agCoud9BRn7sPERB1g,932
|
40
|
-
pycityagent/memory/memory.py,sha256=
|
41
|
-
pycityagent/memory/memory_base.py,sha256=
|
40
|
+
pycityagent/memory/memory.py,sha256=FjKVL_MgNBnSc0sox2tuxLqXg9_MQQr9vYdRDHMdDL4,18183
|
41
|
+
pycityagent/memory/memory_base.py,sha256=euKZRCs4dbcKxjlZzpLCTnH066DAtRjj5g1JFKD40qQ,5633
|
42
42
|
pycityagent/memory/profile.py,sha256=s4LnxSPGSjIGZXHXkkd8mMa6uYYZrytgyQdWjcaqGf4,5182
|
43
43
|
pycityagent/memory/self_define.py,sha256=poPiexNhOLq_iTgK8s4mK_xoL_DAAcB8kMvInj7iE5E,5179
|
44
44
|
pycityagent/memory/state.py,sha256=5W0c1yJ-aaPpE74B2LEcw3Ygpm77tyooHv8NylyrozE,5113
|
45
45
|
pycityagent/memory/utils.py,sha256=wLNlNlZ-AY9VB8kbUIy0UQSYh26FOQABbhmKQkit5o8,850
|
46
46
|
pycityagent/message/__init__.py,sha256=TCjazxqb5DVwbTu1fF0sNvaH_EPXVuj2XQ0p6W-QCLU,55
|
47
|
-
pycityagent/message/messager.py,sha256=
|
47
|
+
pycityagent/message/messager.py,sha256=W_OVlNGcreHSBf6v-DrEnfNCXExB78ySr0w26MSncfU,2541
|
48
48
|
pycityagent/simulation/__init__.py,sha256=jYaqaNpzM5M_e_ykISS_M-mIyYdzJXJWhgpfBpA6l5k,111
|
49
|
-
pycityagent/simulation/agentgroup.py,sha256=
|
50
|
-
pycityagent/simulation/simulation.py,sha256=
|
49
|
+
pycityagent/simulation/agentgroup.py,sha256=M19XWJRWyjMAYS0_RIOBQ2C7I1MuVYIaX3DgehGZL2Y,12541
|
50
|
+
pycityagent/simulation/simulation.py,sha256=TndrMZSm6qe_wgfv9h6mL9oAiAEHbq6KHBwdwUGG_3k,19261
|
51
51
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
52
|
-
pycityagent/survey/manager.py,sha256=
|
53
|
-
pycityagent/survey/models.py,sha256=
|
54
|
-
pycityagent/utils/__init__.py,sha256=
|
55
|
-
pycityagent/utils/avro_schema.py,sha256=
|
52
|
+
pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
|
53
|
+
pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
|
54
|
+
pycityagent/utils/__init__.py,sha256=xXEMhVfFeOJUXjczaHv9DJqYNp57rc6FibtS7CfrVbA,305
|
55
|
+
pycityagent/utils/avro_schema.py,sha256=DHM3bOo8m0dJf8oSwyOWzVeXrH6OERmzA_a5vS4So4M,4255
|
56
56
|
pycityagent/utils/decorators.py,sha256=Gk3r41hfk6awui40tbwpq3C7wC7jHaRmLRlcJFlLQCE,3160
|
57
57
|
pycityagent/utils/parsers/__init__.py,sha256=AN2xgiPxszWK4rpX7zrqRsqNwfGF3WnCA5-PFTvbaKk,281
|
58
58
|
pycityagent/utils/parsers/code_block_parser.py,sha256=Cs2Z_hm9VfNCpPPll1TwteaJF-HAQPs-3RApsOekFm4,1173
|
@@ -62,8 +62,8 @@ pycityagent/utils/survey_util.py,sha256=Be9nptmu2JtesFNemPgORh_2GsN7rcDYGQS9Zfvc
|
|
62
62
|
pycityagent/workflow/__init__.py,sha256=EyCcjB6LyBim-5iAOPe4m2qfvghEPqu1ZdGfy4KPeZ8,551
|
63
63
|
pycityagent/workflow/block.py,sha256=6EmiRMLdOZC1wMlmLMIjfrp9TuiI7Gw4s3nnXVMbrnw,6031
|
64
64
|
pycityagent/workflow/prompt.py,sha256=tY69nDO8fgYfF_dOA-iceR8pAhkYmCqoox8uRPqEuGY,2956
|
65
|
-
pycityagent/workflow/tool.py,sha256=
|
65
|
+
pycityagent/workflow/tool.py,sha256=_bCluIX8HTC8ZW6a-wrMB3Uhx2yzD8sM8XFDI3vd0MM,6642
|
66
66
|
pycityagent/workflow/trigger.py,sha256=t5X_i0WtL32bipZSsq_E3UUyYYudYLxQUpvxbgClp2s,5683
|
67
|
-
pycityagent-2.0.
|
68
|
-
pycityagent-2.0.
|
69
|
-
pycityagent-2.0.
|
67
|
+
pycityagent-2.0.0a16.dist-info/METADATA,sha256=ACLlN0UDbuwDNRv5Olf-K-W7LJWmdZ8ksmeTiclp0Zk,7760
|
68
|
+
pycityagent-2.0.0a16.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
69
|
+
pycityagent-2.0.0a16.dist-info/RECORD,,
|
File without changes
|