pycityagent 2.0.0a49__cp311-cp311-macosx_11_0_arm64.whl → 2.0.0a51__cp311-cp311-macosx_11_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- pycityagent/__init__.py +12 -3
- pycityagent/agent/__init__.py +9 -0
- pycityagent/agent/agent.py +324 -0
- pycityagent/{agent.py → agent/agent_base.py} +41 -345
- pycityagent/cityagent/bankagent.py +28 -16
- pycityagent/cityagent/firmagent.py +63 -25
- pycityagent/cityagent/governmentagent.py +35 -19
- pycityagent/cityagent/initial.py +38 -28
- pycityagent/cityagent/memory_config.py +240 -128
- pycityagent/cityagent/nbsagent.py +82 -36
- pycityagent/cityagent/societyagent.py +155 -72
- pycityagent/simulation/agentgroup.py +2 -2
- pycityagent/simulation/simulation.py +94 -55
- pycityagent/tools/__init__.py +11 -0
- pycityagent/{workflow → tools}/tool.py +3 -1
- pycityagent/workflow/__init__.py +0 -5
- pycityagent/workflow/block.py +12 -10
- {pycityagent-2.0.0a49.dist-info → pycityagent-2.0.0a51.dist-info}/METADATA +1 -2
- {pycityagent-2.0.0a49.dist-info → pycityagent-2.0.0a51.dist-info}/RECORD +23 -20
- {pycityagent-2.0.0a49.dist-info → pycityagent-2.0.0a51.dist-info}/LICENSE +0 -0
- {pycityagent-2.0.0a49.dist-info → pycityagent-2.0.0a51.dist-info}/WHEEL +0 -0
- {pycityagent-2.0.0a49.dist-info → pycityagent-2.0.0a51.dist-info}/entry_points.txt +0 -0
- {pycityagent-2.0.0a49.dist-info → pycityagent-2.0.0a51.dist-info}/top_level.txt +0 -0
@@ -13,6 +13,11 @@ import yaml
|
|
13
13
|
from langchain_core.embeddings import Embeddings
|
14
14
|
|
15
15
|
from ..agent import Agent, InstitutionAgent
|
16
|
+
from ..cityagent import (BankAgent, FirmAgent, GovernmentAgent, NBSAgent,
|
17
|
+
SocietyAgent, memory_config_bank, memory_config_firm,
|
18
|
+
memory_config_government, memory_config_nbs,
|
19
|
+
memory_config_societyagent)
|
20
|
+
from ..cityagent.initial import bind_agent_info, initialize_social_network
|
16
21
|
from ..environment.simulator import Simulator
|
17
22
|
from ..llm import SimpleEmbedding
|
18
23
|
from ..memory import Memory
|
@@ -22,11 +27,10 @@ from ..survey import Survey
|
|
22
27
|
from ..utils import TO_UPDATE_EXP_INFO_KEYS_AND_TYPES
|
23
28
|
from .agentgroup import AgentGroup
|
24
29
|
from .storage.pg import PgWriter, create_pg_tables
|
25
|
-
from ..cityagent import SocietyAgent, FirmAgent, BankAgent, NBSAgent, GovernmentAgent, memory_config_societyagent, memory_config_government, memory_config_firm, memory_config_bank, memory_config_nbs
|
26
|
-
from ..cityagent.initial import bind_agent_info, initialize_social_network
|
27
30
|
|
28
31
|
logger = logging.getLogger("pycityagent")
|
29
32
|
|
33
|
+
|
30
34
|
class AgentSimulation:
|
31
35
|
"""城市智能体模拟器"""
|
32
36
|
|
@@ -52,7 +56,13 @@ class AgentSimulation:
|
|
52
56
|
self.agent_class = agent_class
|
53
57
|
elif agent_class is None:
|
54
58
|
if enable_economy:
|
55
|
-
self.agent_class = [
|
59
|
+
self.agent_class = [
|
60
|
+
SocietyAgent,
|
61
|
+
FirmAgent,
|
62
|
+
BankAgent,
|
63
|
+
NBSAgent,
|
64
|
+
GovernmentAgent,
|
65
|
+
]
|
56
66
|
self.default_memory_config_func = [
|
57
67
|
memory_config_societyagent,
|
58
68
|
memory_config_firm,
|
@@ -82,7 +92,7 @@ class AgentSimulation:
|
|
82
92
|
# self._last_asyncio_pg_task = None # 将SQL写入的IO隐藏到计算任务后
|
83
93
|
|
84
94
|
self._messager = Messager.remote(
|
85
|
-
hostname=config["simulator_request"]["mqtt"]["server"],
|
95
|
+
hostname=config["simulator_request"]["mqtt"]["server"], # type:ignore
|
86
96
|
port=config["simulator_request"]["mqtt"]["port"],
|
87
97
|
username=config["simulator_request"]["mqtt"].get("username", None),
|
88
98
|
password=config["simulator_request"]["mqtt"].get("password", None),
|
@@ -143,7 +153,7 @@ class AgentSimulation:
|
|
143
153
|
"""Directly run from config file
|
144
154
|
Basic config file should contain:
|
145
155
|
- simulation_config: file_path
|
146
|
-
- agent_config:
|
156
|
+
- agent_config:
|
147
157
|
- agent_config_file: Optional[dict]
|
148
158
|
- memory_config_func: Optional[Union[Callable, list[Callable]]]
|
149
159
|
- init_func: Optional[list[Callable[AgentSimulation, None]]]
|
@@ -173,13 +183,14 @@ class AgentSimulation:
|
|
173
183
|
if "workflow" not in config:
|
174
184
|
raise ValueError("workflow is required")
|
175
185
|
import yaml
|
186
|
+
|
176
187
|
logger.info("Loading config file...")
|
177
188
|
with open(config["simulation_config"], "r") as f:
|
178
189
|
simulation_config = yaml.safe_load(f)
|
179
190
|
logger.info("Creating AgentSimulation Task...")
|
180
191
|
simulation = cls(
|
181
|
-
config=simulation_config,
|
182
|
-
agent_config_file=config["agent_config"].get("agent_config_file", None),
|
192
|
+
config=simulation_config,
|
193
|
+
agent_config_file=config["agent_config"].get("agent_config_file", None),
|
183
194
|
exp_name=config.get("exp_name", "default_experiment"),
|
184
195
|
logging_level=config.get("logging_level", logging.WARNING),
|
185
196
|
)
|
@@ -193,21 +204,28 @@ class AgentSimulation:
|
|
193
204
|
await simulation.init_agents(
|
194
205
|
agent_count=agent_count,
|
195
206
|
group_size=config["agent_config"].get("group_size", 10000),
|
196
|
-
embedding_model=config["agent_config"].get(
|
207
|
+
embedding_model=config["agent_config"].get(
|
208
|
+
"embedding_model", SimpleEmbedding()
|
209
|
+
),
|
197
210
|
memory_config_func=config["agent_config"].get("memory_config_func", None),
|
198
211
|
)
|
199
212
|
logger.info("Running Init Functions...")
|
200
|
-
for init_func in config["agent_config"].get(
|
213
|
+
for init_func in config["agent_config"].get(
|
214
|
+
"init_func", [bind_agent_info, initialize_social_network]
|
215
|
+
):
|
201
216
|
await init_func(simulation)
|
202
217
|
logger.info("Starting Simulation...")
|
203
218
|
for step in config["workflow"]:
|
204
|
-
logger.info(
|
219
|
+
logger.info(
|
220
|
+
f"Running step: type: {step['type']} - description: {step.get('description', 'no description')}"
|
221
|
+
)
|
205
222
|
if step["type"] not in ["run", "step", "interview", "survey", "intervene"]:
|
206
223
|
raise ValueError(f"Invalid step type: {step['type']}")
|
207
224
|
if step["type"] == "run":
|
208
225
|
await simulation.run(step.get("day", 1))
|
209
226
|
elif step["type"] == "step":
|
210
|
-
await simulation.step(step.get("time", 1))
|
227
|
+
# await simulation.step(step.get("time", 1))
|
228
|
+
await simulation.step()
|
211
229
|
else:
|
212
230
|
await step["step_func"](simulation)
|
213
231
|
logger.info("Simulation finished")
|
@@ -241,11 +259,11 @@ class AgentSimulation:
|
|
241
259
|
@property
|
242
260
|
def agent_uuid2group(self):
|
243
261
|
return self._agent_uuid2group
|
244
|
-
|
262
|
+
|
245
263
|
@property
|
246
264
|
def messager(self):
|
247
265
|
return self._messager
|
248
|
-
|
266
|
+
|
249
267
|
async def _save_exp_info(self) -> None:
|
250
268
|
"""异步保存实验信息到YAML文件"""
|
251
269
|
try:
|
@@ -354,38 +372,44 @@ class AgentSimulation:
|
|
354
372
|
# 分别处理机构智能体和普通智能体
|
355
373
|
institution_params = []
|
356
374
|
citizen_params = []
|
357
|
-
|
375
|
+
|
358
376
|
# 收集所有参数
|
359
377
|
for i in range(len(self.agent_class)):
|
360
378
|
agent_class = self.agent_class[i]
|
361
379
|
agent_count_i = agent_count[i]
|
362
380
|
memory_config_func_i = memory_config_func[i]
|
363
|
-
|
381
|
+
|
364
382
|
if self.agent_config_file is not None:
|
365
|
-
config_file = self.agent_config_file.get(agent_class, None)
|
383
|
+
config_file = self.agent_config_file.get(agent_class, None)
|
366
384
|
else:
|
367
385
|
config_file = None
|
368
|
-
|
386
|
+
|
369
387
|
if issubclass(agent_class, InstitutionAgent):
|
370
|
-
institution_params.append(
|
388
|
+
institution_params.append(
|
389
|
+
(agent_class, agent_count_i, memory_config_func_i, config_file)
|
390
|
+
)
|
371
391
|
else:
|
372
|
-
citizen_params.append(
|
392
|
+
citizen_params.append(
|
393
|
+
(agent_class, agent_count_i, memory_config_func_i, config_file)
|
394
|
+
)
|
373
395
|
|
374
396
|
# 处理机构智能体组
|
375
397
|
if institution_params:
|
376
398
|
total_institution_count = sum(p[1] for p in institution_params)
|
377
|
-
num_institution_groups = (
|
378
|
-
|
399
|
+
num_institution_groups = (
|
400
|
+
total_institution_count + group_size - 1
|
401
|
+
) // group_size
|
402
|
+
|
379
403
|
for k in range(num_institution_groups):
|
380
404
|
start_idx = k * group_size
|
381
405
|
remaining = total_institution_count - start_idx
|
382
406
|
number_of_agents = min(remaining, group_size)
|
383
|
-
|
407
|
+
|
384
408
|
agent_classes = []
|
385
409
|
agent_counts = []
|
386
410
|
memory_config_funcs = []
|
387
411
|
config_files = []
|
388
|
-
|
412
|
+
|
389
413
|
# 分配每种类型的机构智能体到当前组
|
390
414
|
curr_start = start_idx
|
391
415
|
for agent_class, count, mem_func, conf_file in institution_params:
|
@@ -395,30 +419,32 @@ class AgentSimulation:
|
|
395
419
|
memory_config_funcs.append(mem_func)
|
396
420
|
config_files.append(conf_file)
|
397
421
|
curr_start = max(0, curr_start - count)
|
398
|
-
|
399
|
-
group_creation_params.append(
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
422
|
+
|
423
|
+
group_creation_params.append(
|
424
|
+
(
|
425
|
+
agent_classes,
|
426
|
+
agent_counts,
|
427
|
+
memory_config_funcs,
|
428
|
+
f"InstitutionGroup_{k}",
|
429
|
+
config_files,
|
430
|
+
)
|
431
|
+
)
|
406
432
|
|
407
433
|
# 处理普通智能体组
|
408
434
|
if citizen_params:
|
409
435
|
total_citizen_count = sum(p[1] for p in citizen_params)
|
410
436
|
num_citizen_groups = (total_citizen_count + group_size - 1) // group_size
|
411
|
-
|
437
|
+
|
412
438
|
for k in range(num_citizen_groups):
|
413
439
|
start_idx = k * group_size
|
414
440
|
remaining = total_citizen_count - start_idx
|
415
441
|
number_of_agents = min(remaining, group_size)
|
416
|
-
|
442
|
+
|
417
443
|
agent_classes = []
|
418
444
|
agent_counts = []
|
419
445
|
memory_config_funcs = []
|
420
446
|
config_files = []
|
421
|
-
|
447
|
+
|
422
448
|
# 分配每种类型的普通智能体到当前组
|
423
449
|
curr_start = start_idx
|
424
450
|
for agent_class, count, mem_func, conf_file in citizen_params:
|
@@ -428,14 +454,16 @@ class AgentSimulation:
|
|
428
454
|
memory_config_funcs.append(mem_func)
|
429
455
|
config_files.append(conf_file)
|
430
456
|
curr_start = max(0, curr_start - count)
|
431
|
-
|
432
|
-
group_creation_params.append(
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
457
|
+
|
458
|
+
group_creation_params.append(
|
459
|
+
(
|
460
|
+
agent_classes,
|
461
|
+
agent_counts,
|
462
|
+
memory_config_funcs,
|
463
|
+
f"CitizenGroup_{k}",
|
464
|
+
config_files,
|
465
|
+
)
|
466
|
+
)
|
439
467
|
|
440
468
|
# 初始化mlflow连接
|
441
469
|
_mlflow_config = self.config.get("metric_request", {}).get("mlflow")
|
@@ -463,7 +491,13 @@ class AgentSimulation:
|
|
463
491
|
self._pgsql_writers = _workers = [None for _ in range(_num_workers)]
|
464
492
|
|
465
493
|
creation_tasks = []
|
466
|
-
for i, (
|
494
|
+
for i, (
|
495
|
+
agent_class,
|
496
|
+
number_of_agents,
|
497
|
+
memory_config_function_group,
|
498
|
+
group_name,
|
499
|
+
config_file,
|
500
|
+
) in enumerate(group_creation_params):
|
467
501
|
# 直接创建异步任务
|
468
502
|
group = AgentGroup.remote(
|
469
503
|
agent_class,
|
@@ -489,7 +523,9 @@ class AgentSimulation:
|
|
489
523
|
group_agent_uuids = ray.get(group.get_agent_uuids.remote())
|
490
524
|
for agent_uuid in group_agent_uuids:
|
491
525
|
self._agent_uuid2group[agent_uuid] = group
|
492
|
-
self._user_chat_topics[agent_uuid] =
|
526
|
+
self._user_chat_topics[agent_uuid] = (
|
527
|
+
f"exps/{self.exp_id}/agents/{agent_uuid}/user-chat"
|
528
|
+
)
|
493
529
|
self._user_survey_topics[agent_uuid] = (
|
494
530
|
f"exps/{self.exp_id}/agents/{agent_uuid}/user-survey"
|
495
531
|
)
|
@@ -511,23 +547,26 @@ class AgentSimulation:
|
|
511
547
|
for group in self._groups.values():
|
512
548
|
gather_tasks.append(group.gather.remote(content))
|
513
549
|
return await asyncio.gather(*gather_tasks)
|
514
|
-
|
515
|
-
async def filter(
|
516
|
-
|
517
|
-
|
518
|
-
|
550
|
+
|
551
|
+
async def filter(
|
552
|
+
self,
|
553
|
+
types: Optional[list[Type[Agent]]] = None,
|
554
|
+
keys: Optional[list[str]] = None,
|
555
|
+
values: Optional[list[Any]] = None,
|
556
|
+
) -> list[str]:
|
519
557
|
"""过滤出指定类型的智能体"""
|
520
558
|
if not types and not keys and not values:
|
521
559
|
return self._agent_uuids
|
522
560
|
group_to_filter = []
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
561
|
+
if types is not None:
|
562
|
+
for t in types:
|
563
|
+
if t in self._type2group:
|
564
|
+
group_to_filter.extend(self._type2group[t])
|
565
|
+
else:
|
566
|
+
raise ValueError(f"type {t} not found in simulation")
|
528
567
|
filtered_uuids = []
|
529
568
|
if keys:
|
530
|
-
if len(keys) != len(values):
|
569
|
+
if values is None or len(keys) != len(values):
|
531
570
|
raise ValueError("the length of key and value does not match")
|
532
571
|
for group in group_to_filter:
|
533
572
|
filtered_uuids.extend(await group.filter.remote(types, keys, values))
|
@@ -7,9 +7,9 @@ from typing import Any, Optional, Union
|
|
7
7
|
from mlflow.entities import Metric
|
8
8
|
|
9
9
|
from ..agent import Agent
|
10
|
-
from ..utils.decorators import lock_decorator
|
11
10
|
from ..environment import (LEVEL_ONE_PRE, POI_TYPE_DICT, AoiService,
|
12
11
|
PersonService)
|
12
|
+
from ..utils.decorators import lock_decorator
|
13
13
|
from ..workflow import Block
|
14
14
|
|
15
15
|
|
@@ -199,6 +199,7 @@ class ExportMlflowMetrics(Tool):
|
|
199
199
|
# TODO: support other log types
|
200
200
|
self.metric_log_cache: dict[str, list[Metric]] = defaultdict(list)
|
201
201
|
self._lock = asyncio.Lock()
|
202
|
+
|
202
203
|
@lock_decorator
|
203
204
|
async def __call__(
|
204
205
|
self,
|
@@ -231,6 +232,7 @@ class ExportMlflowMetrics(Tool):
|
|
231
232
|
_cache = _cache[batch_size:]
|
232
233
|
if clear_cache:
|
233
234
|
await self._clear_cache()
|
235
|
+
|
234
236
|
@lock_decorator
|
235
237
|
async def _clear_cache(
|
236
238
|
self,
|
pycityagent/workflow/__init__.py
CHANGED
@@ -7,14 +7,9 @@ This module contains classes for creating blocks and running workflows.
|
|
7
7
|
from .block import (Block, log_and_check, log_and_check_with_memory,
|
8
8
|
trigger_class)
|
9
9
|
from .prompt import FormatPrompt
|
10
|
-
from .tool import ExportMlflowMetrics, GetMap, SencePOI, Tool
|
11
10
|
from .trigger import EventTrigger, MemoryChangeTrigger, TimeTrigger
|
12
11
|
|
13
12
|
__all__ = [
|
14
|
-
"SencePOI",
|
15
|
-
"Tool",
|
16
|
-
"ExportMlflowMetrics",
|
17
|
-
"GetMap",
|
18
13
|
"MemoryChangeTrigger",
|
19
14
|
"TimeTrigger",
|
20
15
|
"EventTrigger",
|
pycityagent/workflow/block.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
from __future__ import annotations
|
2
|
+
|
2
3
|
import asyncio
|
3
4
|
import functools
|
4
5
|
import inspect
|
5
|
-
from collections.abc import Awaitable, Callable, Coroutine
|
6
6
|
import json
|
7
|
-
from
|
7
|
+
from collections.abc import Awaitable, Callable, Coroutine
|
8
|
+
from typing import Any, Optional, Union
|
8
9
|
|
9
10
|
from pyparsing import Dict
|
10
11
|
|
@@ -143,7 +144,7 @@ def trigger_class():
|
|
143
144
|
|
144
145
|
# Define a Block, similar to a layer in PyTorch
|
145
146
|
class Block:
|
146
|
-
configurable_fields:
|
147
|
+
configurable_fields: list[str] = []
|
147
148
|
default_values: dict[str, Any] = {}
|
148
149
|
|
149
150
|
def __init__(
|
@@ -164,22 +165,23 @@ class Block:
|
|
164
165
|
trigger.initialize() # 立即初始化trigger
|
165
166
|
self.trigger = trigger
|
166
167
|
|
167
|
-
def export_config(self) ->
|
168
|
+
def export_config(self) -> dict[str, Optional[str]]:
|
168
169
|
return {
|
169
170
|
field: self.default_values.get(field, "default_value")
|
170
171
|
for field in self.configurable_fields
|
171
172
|
}
|
172
173
|
|
173
174
|
@classmethod
|
174
|
-
def export_class_config(cls) ->
|
175
|
+
def export_class_config(cls) -> dict[str, str]:
|
175
176
|
return {
|
176
177
|
field: cls.default_values.get(field, "default_value")
|
177
178
|
for field in cls.configurable_fields
|
178
179
|
}
|
179
180
|
|
180
181
|
@classmethod
|
181
|
-
def import_config(cls, config:
|
182
|
+
def import_config(cls, config: dict[str, Union[str, dict]]) -> Block:
|
182
183
|
instance = cls(name=config["name"])
|
184
|
+
assert isinstance(config["config"], dict)
|
183
185
|
for field, value in config["config"].items():
|
184
186
|
if field in cls.configurable_fields:
|
185
187
|
setattr(instance, field, value)
|
@@ -190,8 +192,8 @@ class Block:
|
|
190
192
|
setattr(instance, child_block.name.lower(), child_block)
|
191
193
|
|
192
194
|
return instance
|
193
|
-
|
194
|
-
def load_from_config(self, config:
|
195
|
+
|
196
|
+
def load_from_config(self, config: dict[str, list[Dict]]) -> None:
|
195
197
|
"""
|
196
198
|
使用配置更新当前Block实例的参数,并递归更新子Block。
|
197
199
|
"""
|
@@ -201,8 +203,8 @@ class Block:
|
|
201
203
|
if config["config"][field] != "default_value":
|
202
204
|
setattr(self, field, config["config"][field])
|
203
205
|
|
204
|
-
def build_or_update_block(block_data:
|
205
|
-
block_name = block_data["name"].lower()
|
206
|
+
def build_or_update_block(block_data: dict) -> Block:
|
207
|
+
block_name = block_data["name"].lower() # type:ignore
|
206
208
|
existing_block = getattr(self, block_name, None)
|
207
209
|
|
208
210
|
if existing_block:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pycityagent
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0a51
|
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
|
@@ -50,7 +50,6 @@ Requires-Dist: requests>=2.32.3
|
|
50
50
|
Requires-Dist: Shapely>=2.0.6
|
51
51
|
Requires-Dist: PyYAML>=6.0.2
|
52
52
|
Requires-Dist: zhipuai>=2.1.5.20230904
|
53
|
-
Requires-Dist: gradio>=5.7.1
|
54
53
|
Requires-Dist: mosstool>=1.3.0
|
55
54
|
Requires-Dist: ray>=2.40.0
|
56
55
|
Requires-Dist: aiomqtt>=2.3.0
|
@@ -1,12 +1,13 @@
|
|
1
1
|
pycityagent/pycityagent-sim,sha256=n96jlVZRINlBec5SPOGAdUmeLWMoEKGgoH29iOVJ0wE,34081890
|
2
|
-
pycityagent/__init__.py,sha256=
|
2
|
+
pycityagent/__init__.py,sha256=PUKWTXc-xdMG7px8oTNclodsILUgypANj2Z647sY63k,808
|
3
3
|
pycityagent/pycityagent-ui,sha256=cHZjqtrQ4Fh4qtRahFNCNbT2DNHLmUexiDAa-72Z3RQ,40333378
|
4
|
-
pycityagent/agent.py,sha256=iaF83y344V29-jghx5bJD3yY8kMuSzInBPNi7cVxYiA,34026
|
5
4
|
pycityagent/metrics/mlflow_client.py,sha256=g_tHxWkWTDijtbGL74-HmiYzWVKb1y8-w12QrY9jL30,4449
|
6
5
|
pycityagent/metrics/__init__.py,sha256=X08PaBbGVAd7_PRGLREXWxaqm7nS82WBQpD1zvQzcqc,128
|
7
6
|
pycityagent/metrics/utils/const.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
7
|
pycityagent/economy/__init__.py,sha256=aonY4WHnx-6EGJ4WKrx4S-2jAkYNLtqUA04jp6q8B7w,75
|
9
8
|
pycityagent/economy/econ_client.py,sha256=GuHK9ZBnhqW3Z7F8ViDJn_iN73yOBbbwFyJv1wLEBDk,12211
|
9
|
+
pycityagent/tools/__init__.py,sha256=XtdtGyWeFyK1YOUvWkykBWxemtmwQjWUIuuyU1-gosQ,261
|
10
|
+
pycityagent/tools/tool.py,sha256=JD5APkoWqnS46gyimI17no2fPknjwkk173AFt-oFv_c,8778
|
10
11
|
pycityagent/llm/llmconfig.py,sha256=4Ylf4OFSBEFy8jrOneeX0HvPhWEaF5jGvy1HkXK08Ro,436
|
11
12
|
pycityagent/llm/__init__.py,sha256=iWs6FLgrbRVIiqOf4ILS89gkVCTvS7HFC3vG-MWuyko,205
|
12
13
|
pycityagent/llm/llm.py,sha256=owTYuXmnHZnvXaAvwiiyD511P3wpU3K04xZArhhiJF0,15700
|
@@ -21,9 +22,9 @@ pycityagent/memory/utils.py,sha256=oJWLdPeJy_jcdKcDTo9JAH9kDZhqjoQhhv_zT9qWC0w,8
|
|
21
22
|
pycityagent/memory/const.py,sha256=6zpJPJXWoH9-yf4RARYYff586agCoud9BRn7sPERB1g,932
|
22
23
|
pycityagent/memory/faiss_query.py,sha256=Z0JS4udyPYCIzHMq464QtHscnswu35gh9fQptikAwkQ,12976
|
23
24
|
pycityagent/memory/state.py,sha256=TYItiyDtehMEQaSBN7PpNrnNxdDM5jGppr9R9Ufv3kA,5134
|
24
|
-
pycityagent/simulation/simulation.py,sha256=
|
25
|
+
pycityagent/simulation/simulation.py,sha256=DkTYkdNknz2d7hIdYhxxLewUkYwmS9uOxnmEGTwbL_Q,26098
|
25
26
|
pycityagent/simulation/__init__.py,sha256=P5czbcg2d8S0nbbnsQXFIhwzO4CennAhZM8OmKvAeYw,194
|
26
|
-
pycityagent/simulation/agentgroup.py,sha256=
|
27
|
+
pycityagent/simulation/agentgroup.py,sha256=fMTN9xDC-PdTGZ4KCMovZeGjzv8HIQJ1AGVG7iAJnD4,29351
|
27
28
|
pycityagent/simulation/storage/pg.py,sha256=5itxKOkNPlOzN7z2_3oKU1ZK0uLTDugfld8ZkRbD69I,8407
|
28
29
|
pycityagent/message/__init__.py,sha256=TCjazxqb5DVwbTu1fF0sNvaH_EPXVuj2XQ0p6W-QCLU,55
|
29
30
|
pycityagent/message/messager.py,sha256=78K31EPKfC5IxbISc-Lc2babC7VOh9Vbe3c0sO-YDLA,3333
|
@@ -36,11 +37,13 @@ pycityagent/utils/parsers/__init__.py,sha256=AN2xgiPxszWK4rpX7zrqRsqNwfGF3WnCA5-
|
|
36
37
|
pycityagent/utils/parsers/code_block_parser.py,sha256=Cs2Z_hm9VfNCpPPll1TwteaJF-HAQPs-3RApsOekFm4,1173
|
37
38
|
pycityagent/utils/parsers/parser_base.py,sha256=KBKO4zLZPNdGjPAGqIus8LseZ8W3Tlt2y0QxqeCd25Q,1713
|
38
39
|
pycityagent/utils/parsers/json_parser.py,sha256=tjwyPluYfkWgsvLi0hzfJwFhO3L6yQfZMKza20HaGrY,2911
|
40
|
+
pycityagent/agent/agent_base.py,sha256=78J6np8XrFXTUXTC9x_O28EUmyWsdgtARd1KfNcC0cI,23073
|
41
|
+
pycityagent/agent/__init__.py,sha256=U20yKu9QwSqAx_PHk5JwipfODkDfxONtumVfnsKjWFg,180
|
42
|
+
pycityagent/agent/agent.py,sha256=8biuC44Yx4T8Fntlj_RGTlnKWwS0XDNkfYQrv5xXUwE,11548
|
39
43
|
pycityagent/cli/wrapper.py,sha256=2Tb52gOlEVgn11Ekt6ZkRXr_BGzte-EPyBKnR6g6hQ4,1143
|
40
|
-
pycityagent/workflow/__init__.py,sha256=
|
44
|
+
pycityagent/workflow/__init__.py,sha256=H08Ko3eliZvuuCMajbEri-IP4-SeswYU6UjHBNA4Ze0,490
|
41
45
|
pycityagent/workflow/prompt.py,sha256=6jI0Rq54JLv3-IXqZLYug62vse10wTI83xvf4ZX42nk,2929
|
42
|
-
pycityagent/workflow/block.py,sha256=
|
43
|
-
pycityagent/workflow/tool.py,sha256=ChuN5Sm-yltesemewjnTOYaxN6NUjfi2MezVuclf6Tc,8776
|
46
|
+
pycityagent/workflow/block.py,sha256=3X6qzpYmmMyZyXA6Dxl4lS-mNR0eLzLoiRhHY-H1rzE,9667
|
44
47
|
pycityagent/workflow/trigger.py,sha256=Df-MOBEDWBbM-v0dFLQLXteLsipymT4n8vqexmK2GiQ,5643
|
45
48
|
pycityagent/environment/__init__.py,sha256=awHxlOud-btWbk0FCS4RmGJ13W84oVCkbGfcrhKqihA,240
|
46
49
|
pycityagent/environment/simulator.py,sha256=1OUfODDzM4EN6Lw_Wzq4KeQb-EpcUBioZYc9fxfSPn0,12070
|
@@ -70,14 +73,14 @@ pycityagent/environment/sim/clock_service.py,sha256=fgYXacf_-ixhVAn5uKUvqvemBS6A
|
|
70
73
|
pycityagent/environment/sim/road_service.py,sha256=bKyn3_me0sGmaJVyF6eNeFbdU-9C1yWsa9L7pieDJzg,1285
|
71
74
|
pycityagent/environment/interact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
72
75
|
pycityagent/environment/interact/interact.py,sha256=ifxPPzuHeqLHIZ_6zvfXMoBOnBsXNIP4bYp7OJ7pnEQ,6588
|
73
|
-
pycityagent/cityagent/memory_config.py,sha256=
|
74
|
-
pycityagent/cityagent/bankagent.py,sha256=
|
76
|
+
pycityagent/cityagent/memory_config.py,sha256=6dkgqPczANUqZpqGXDOt7wrS6vHdFSMNkWvEVwo6VIQ,10672
|
77
|
+
pycityagent/cityagent/bankagent.py,sha256=9J0c_r6m0OJH2KpXxeCWstLqZVpjQ67xuWmDTbVm7KM,2217
|
75
78
|
pycityagent/cityagent/__init__.py,sha256=gcBQ-a50XegFtjigQ7xDXRBZrywBKqifiQFSRnEF8gM,572
|
76
|
-
pycityagent/cityagent/firmagent.py,sha256=
|
77
|
-
pycityagent/cityagent/nbsagent.py,sha256=
|
78
|
-
pycityagent/cityagent/initial.py,sha256=
|
79
|
-
pycityagent/cityagent/societyagent.py,sha256
|
80
|
-
pycityagent/cityagent/governmentagent.py,sha256=
|
79
|
+
pycityagent/cityagent/firmagent.py,sha256=Mtb58YfW3V696gXA6TRw1qUL1WIzthahDBv2X5x_Iyg,4176
|
80
|
+
pycityagent/cityagent/nbsagent.py,sha256=SIOigR8eiSHC0Gi8kg32hLxsqPKDgCHWF0HA89EU7eA,5202
|
81
|
+
pycityagent/cityagent/initial.py,sha256=7hgCt_tGdnVTXGfEQOn1GTW5dAs1b-ru_FwXxRLI6tM,4549
|
82
|
+
pycityagent/cityagent/societyagent.py,sha256=oVDWt-DDGMDxh_LpqMs4_CX-5hVQORyPC1ZW2a8CrhI,14960
|
83
|
+
pycityagent/cityagent/governmentagent.py,sha256=9fjGueVmYok7zca14E1VL4N3ENEhnq2nubI6ab7Hzp0,2825
|
81
84
|
pycityagent/cityagent/blocks/dispatcher.py,sha256=mEa1r3tRS3KI1BMZR_w_sbUGzOj6aUJuiUrsHv1n2n0,2943
|
82
85
|
pycityagent/cityagent/blocks/needs_block.py,sha256=pPPjdVFCqFvAV0RM1LVevQIH5d0GALnB6xLekvplutE,13113
|
83
86
|
pycityagent/cityagent/blocks/cognition_block.py,sha256=CGIYwuF1twS5g3DNhCkaSFT2s1IQXF5NjJO38EX6FLg,15633
|
@@ -92,9 +95,9 @@ pycityagent/cityagent/blocks/mobility_block.py,sha256=ZebloDhvZJYbV0YSWhAbnOLToi
|
|
92
95
|
pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
|
93
96
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
94
97
|
pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
|
95
|
-
pycityagent-2.0.
|
96
|
-
pycityagent-2.0.
|
97
|
-
pycityagent-2.0.
|
98
|
-
pycityagent-2.0.
|
99
|
-
pycityagent-2.0.
|
100
|
-
pycityagent-2.0.
|
98
|
+
pycityagent-2.0.0a51.dist-info/RECORD,,
|
99
|
+
pycityagent-2.0.0a51.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
100
|
+
pycityagent-2.0.0a51.dist-info/WHEEL,sha256=DQkJubmXvyOE1DlaPsfq9czNuGB2yvzYGbMABjt_JVM,109
|
101
|
+
pycityagent-2.0.0a51.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
102
|
+
pycityagent-2.0.0a51.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
103
|
+
pycityagent-2.0.0a51.dist-info/METADATA,sha256=zmYO5Z37qS-ENVQomAcXnJA_8TD1RDSe6IGkmYHq3MM,9110
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|