pycityagent 2.0.0a59__cp312-cp312-macosx_11_0_arm64.whl → 2.0.0a60__cp312-cp312-macosx_11_0_arm64.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.
@@ -94,24 +94,19 @@ class CitizenAgent(Agent):
94
94
  logger.warning("Economy client is not set")
95
95
  return
96
96
  if not self._has_bound_to_economy:
97
- if self._has_bound_to_simulator:
98
- try:
99
- await self._economy_client.remove_agents([self._agent_id])
100
- except:
101
- pass
102
- person_id = await self.status.get("id")
103
- currency = await self.status.get("currency")
104
- await self._economy_client.add_agents(
105
- {
106
- "id": person_id,
107
- "currency": currency,
108
- }
109
- )
110
- self._has_bound_to_economy = True
111
- else:
112
- logger.debug(
113
- f"Binding to Economy before binding to Simulator, skip binding to Economy Simulator"
114
- )
97
+ try:
98
+ await self._economy_client.remove_agents([self._agent_id])
99
+ except:
100
+ pass
101
+ person_id = await self.status.get("id")
102
+ currency = await self.status.get("currency")
103
+ await self._economy_client.add_agents(
104
+ {
105
+ "id": person_id,
106
+ "currency": currency,
107
+ }
108
+ )
109
+ self._has_bound_to_economy = True
115
110
 
116
111
  async def handle_gather_message(self, payload: dict):
117
112
  """处理收到的消息,识别发送者"""
@@ -176,7 +171,6 @@ class InstitutionAgent(Agent):
176
171
  await self._bind_to_economy()
177
172
 
178
173
  async def _bind_to_economy(self):
179
- print("Debug:", self._economy_client, self._has_bound_to_economy)
180
174
  if self._economy_client is None:
181
175
  logger.debug("Economy client is not set")
182
176
  return
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pycityagent
3
- Version: 2.0.0a59
3
+ Version: 2.0.0a60
4
4
  Summary: LLM-based city environment agent building library
5
5
  Author-email: Yuwei Yan <pinkgranite86@gmail.com>, Junbo Yan <yanjb20thu@gmali.com>, Jun Zhang <zhangjun990222@gmali.com>
6
6
  License: MIT License
@@ -1,4 +1,10 @@
1
- pycityagent/pycityagent-sim,sha256=1Nu-QYC0AuZyVWciGNa2XkYsUntbwAS15Bo7l-y6eok,35449490
1
+ pycityagent-2.0.0a60.dist-info/RECORD,,
2
+ pycityagent-2.0.0a60.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
3
+ pycityagent-2.0.0a60.dist-info/WHEEL,sha256=VujM3ypTCyUW6hcTDdK2ej0ARVMxlU1Djlh_zWnDgqk,109
4
+ pycityagent-2.0.0a60.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
5
+ pycityagent-2.0.0a60.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
6
+ pycityagent-2.0.0a60.dist-info/METADATA,sha256=oyO0iwWkmdYb_ImPGko3_7auKYsx4ve45hSRRTEmYFs,9110
7
+ pycityagent/pycityagent-sim,sha256=vskCJGHJEh0B2dUfmYlVyrcy3sDZ3kBNwjqcYUZpmO8,35449490
2
8
  pycityagent/__init__.py,sha256=PUKWTXc-xdMG7px8oTNclodsILUgypANj2Z647sY63k,808
3
9
  pycityagent/pycityagent-ui,sha256=cHZjqtrQ4Fh4qtRahFNCNbT2DNHLmUexiDAa-72Z3RQ,40333378
4
10
  pycityagent/metrics/mlflow_client.py,sha256=bTrqYsRfNfjJd6l91hU8vN7JXzJC7DHiM2XbkhMuXIU,4613
@@ -40,7 +46,7 @@ pycityagent/utils/parsers/parser_base.py,sha256=KBKO4zLZPNdGjPAGqIus8LseZ8W3Tlt2
40
46
  pycityagent/utils/parsers/json_parser.py,sha256=tjwyPluYfkWgsvLi0hzfJwFhO3L6yQfZMKza20HaGrY,2911
41
47
  pycityagent/agent/agent_base.py,sha256=vC1nMWahwi_nVBUXVdC1CnZpqimKZApixD2m2Iqu_bg,24196
42
48
  pycityagent/agent/__init__.py,sha256=U20yKu9QwSqAx_PHk5JwipfODkDfxONtumVfnsKjWFg,180
43
- pycityagent/agent/agent.py,sha256=FNon_OPvGrh976AEHpaAQyLQN7erbGOX-BxGnCVZza8,12038
49
+ pycityagent/agent/agent.py,sha256=H5AXh92LZZzrGHH8dkwAVTKQIfI8a7xH-83iv50Qejs,11696
44
50
  pycityagent/cli/wrapper.py,sha256=9aG6D2cnmh6aIhiVXKPGKuMjVcdAa-TwzANudb2q_FU,1147
45
51
  pycityagent/workflow/__init__.py,sha256=H08Ko3eliZvuuCMajbEri-IP4-SeswYU6UjHBNA4Ze0,490
46
52
  pycityagent/workflow/prompt.py,sha256=6jI0Rq54JLv3-IXqZLYug62vse10wTI83xvf4ZX42nk,2929
@@ -97,9 +103,3 @@ pycityagent/cityagent/blocks/mobility_block.py,sha256=xWbARMfJ3-6fddrW3VOUKJrXfM
97
103
  pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
98
104
  pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
99
105
  pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
100
- pycityagent-2.0.0a59.dist-info/RECORD,,
101
- pycityagent-2.0.0a59.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
102
- pycityagent-2.0.0a59.dist-info/WHEEL,sha256=VujM3ypTCyUW6hcTDdK2ej0ARVMxlU1Djlh_zWnDgqk,109
103
- pycityagent-2.0.0a59.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
104
- pycityagent-2.0.0a59.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
105
- pycityagent-2.0.0a59.dist-info/METADATA,sha256=RMs-AgvrIOTGBqaoqMei0bF2eJRRqIwQn-r3UGBzwr0,9110