pycityagent 2.0.0a53__cp310-cp310-macosx_11_0_arm64.whl → 2.0.0a54__cp310-cp310-macosx_11_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- pycityagent/agent/agent.py +39 -4
- pycityagent/agent/agent_base.py +39 -25
- pycityagent/cityagent/blocks/plan_block.py +1 -1
- pycityagent/cityagent/message_intercept.py +99 -0
- pycityagent/cityagent/societyagent.py +145 -32
- pycityagent/cli/wrapper.py +4 -0
- pycityagent/economy/econ_client.py +0 -2
- pycityagent/environment/__init__.py +7 -1
- pycityagent/environment/sim/sim_env.py +34 -46
- pycityagent/environment/simulator.py +2 -3
- pycityagent/llm/llm.py +18 -10
- pycityagent/memory/memory.py +151 -113
- pycityagent/message/__init__.py +8 -1
- pycityagent/message/message_interceptor.py +322 -0
- pycityagent/message/messager.py +42 -11
- pycityagent/simulation/agentgroup.py +62 -14
- pycityagent/simulation/simulation.py +95 -24
- pycityagent/simulation/storage/pg.py +2 -2
- pycityagent/utils/__init__.py +7 -2
- pycityagent/utils/pg_query.py +1 -0
- pycityagent/utils/survey_util.py +26 -23
- pycityagent/workflow/block.py +3 -3
- {pycityagent-2.0.0a53.dist-info → pycityagent-2.0.0a54.dist-info}/METADATA +2 -2
- {pycityagent-2.0.0a53.dist-info → pycityagent-2.0.0a54.dist-info}/RECORD +28 -26
- {pycityagent-2.0.0a53.dist-info → pycityagent-2.0.0a54.dist-info}/LICENSE +0 -0
- {pycityagent-2.0.0a53.dist-info → pycityagent-2.0.0a54.dist-info}/WHEEL +0 -0
- {pycityagent-2.0.0a53.dist-info → pycityagent-2.0.0a54.dist-info}/entry_points.txt +0 -0
- {pycityagent-2.0.0a53.dist-info → pycityagent-2.0.0a54.dist-info}/top_level.txt +0 -0
@@ -18,12 +18,15 @@ from ..cityagent import (BankAgent, FirmAgent, GovernmentAgent, NBSAgent,
|
|
18
18
|
memory_config_government, memory_config_nbs,
|
19
19
|
memory_config_societyagent)
|
20
20
|
from ..cityagent.initial import bind_agent_info, initialize_social_network
|
21
|
-
from ..environment
|
22
|
-
from ..llm import SimpleEmbedding
|
23
|
-
from ..
|
24
|
-
from ..
|
21
|
+
from ..environment import Simulator
|
22
|
+
from ..llm import LLM, LLMConfig, SimpleEmbedding
|
23
|
+
from ..memory import Memory
|
24
|
+
from ..message import (MessageBlockBase, MessageBlockListenerBase,
|
25
|
+
MessageInterceptor, Messager)
|
26
|
+
from ..metrics import init_mlflow_connection
|
27
|
+
from ..metrics.mlflow_client import MlflowClient
|
25
28
|
from ..survey import Survey
|
26
|
-
from ..utils import TO_UPDATE_EXP_INFO_KEYS_AND_TYPES
|
29
|
+
from ..utils import SURVEY_SENDER_UUID, TO_UPDATE_EXP_INFO_KEYS_AND_TYPES
|
27
30
|
from .agentgroup import AgentGroup
|
28
31
|
from .storage.pg import PgWriter, create_pg_tables
|
29
32
|
|
@@ -80,6 +83,15 @@ class AgentSimulation:
|
|
80
83
|
self.config = config
|
81
84
|
self.exp_name = exp_name
|
82
85
|
self._simulator = Simulator(config["simulator_request"])
|
86
|
+
if enable_economy:
|
87
|
+
self._economy_env = self._simulator._sim_env
|
88
|
+
_req_dict = self.config["simulator_request"]
|
89
|
+
if "economy" in _req_dict:
|
90
|
+
_req_dict["economy"]["server"] = self._economy_env.sim_addr
|
91
|
+
else:
|
92
|
+
_req_dict["economy"] = {
|
93
|
+
"server": self._economy_env.sim_addr,
|
94
|
+
}
|
83
95
|
self.agent_prefix = agent_prefix
|
84
96
|
self._groups: dict[str, AgentGroup] = {} # type:ignore
|
85
97
|
self._agent_uuid2group: dict[str, AgentGroup] = {} # type:ignore
|
@@ -225,6 +237,7 @@ class AgentSimulation:
|
|
225
237
|
agent_count.append(config["agent_config"]["number_of_government"])
|
226
238
|
agent_count.append(config["agent_config"]["number_of_bank"])
|
227
239
|
agent_count.append(config["agent_config"]["number_of_nbs"])
|
240
|
+
# TODO(yanjunbo): support MessageInterceptor
|
228
241
|
await simulation.init_agents(
|
229
242
|
agent_count=agent_count,
|
230
243
|
group_size=config["agent_config"].get("group_size", 10000),
|
@@ -290,9 +303,13 @@ class AgentSimulation:
|
|
290
303
|
return self._agent_uuid2group
|
291
304
|
|
292
305
|
@property
|
293
|
-
def messager(self):
|
306
|
+
def messager(self) -> ray.ObjectRef:
|
294
307
|
return self._messager
|
295
308
|
|
309
|
+
@property
|
310
|
+
def message_interceptor(self) -> ray.ObjectRef:
|
311
|
+
return self._message_interceptors[0] # type:ignore
|
312
|
+
|
296
313
|
async def _save_exp_info(self) -> None:
|
297
314
|
"""异步保存实验信息到YAML文件"""
|
298
315
|
try:
|
@@ -371,6 +388,10 @@ class AgentSimulation:
|
|
371
388
|
agent_count: Union[int, list[int]],
|
372
389
|
group_size: int = 10000,
|
373
390
|
pg_sql_writers: int = 32,
|
391
|
+
message_interceptors: int = 1,
|
392
|
+
message_interceptor_blocks: Optional[list[MessageBlockBase]] = None,
|
393
|
+
social_black_list: Optional[list[tuple[str, str]]] = None,
|
394
|
+
message_listener: Optional[MessageBlockListenerBase] = None,
|
374
395
|
embedding_model: Embeddings = SimpleEmbedding(),
|
375
396
|
memory_config_func: Optional[Union[Callable, list[Callable]]] = None,
|
376
397
|
) -> None:
|
@@ -379,6 +400,8 @@ class AgentSimulation:
|
|
379
400
|
Args:
|
380
401
|
agent_count: 要创建的总智能体数量, 如果为列表,则每个元素表示一个智能体类创建的智能体数量
|
381
402
|
group_size: 每个组的智能体数量,每一个组为一个独立的ray actor
|
403
|
+
pg_sql_writers: 独立的PgSQL writer数量
|
404
|
+
message_interceptors: message拦截器数量
|
382
405
|
memory_config_func: 返回Memory配置的函数,需要返回(EXTRA_ATTRIBUTES, PROFILE, BASE)元组, 如果为列表,则每个元素表示一个智能体类创建的Memory配置函数
|
383
406
|
"""
|
384
407
|
if not isinstance(agent_count, list):
|
@@ -499,7 +522,16 @@ class AgentSimulation:
|
|
499
522
|
config_files,
|
500
523
|
)
|
501
524
|
)
|
502
|
-
|
525
|
+
# 初始化mlflow连接
|
526
|
+
_mlflow_config = self.config.get("metric_request", {}).get("mlflow")
|
527
|
+
if _mlflow_config:
|
528
|
+
mlflow_run_id, _ = init_mlflow_connection(
|
529
|
+
config=_mlflow_config,
|
530
|
+
mlflow_run_name=f"{self.exp_name}_{1000*int(time.time())}",
|
531
|
+
experiment_name=self.exp_name,
|
532
|
+
)
|
533
|
+
else:
|
534
|
+
mlflow_run_id = None
|
503
535
|
# 建表
|
504
536
|
if self.enable_pgsql:
|
505
537
|
_num_workers = min(1, pg_sql_writers)
|
@@ -514,7 +546,31 @@ class AgentSimulation:
|
|
514
546
|
else:
|
515
547
|
_num_workers = 1
|
516
548
|
self._pgsql_writers = _workers = [None for _ in range(_num_workers)]
|
517
|
-
|
549
|
+
# message interceptor
|
550
|
+
if message_listener is not None:
|
551
|
+
self._message_abort_listening_queue = _queue = ray.util.queue.Queue() # type: ignore
|
552
|
+
await message_listener.set_queue(_queue)
|
553
|
+
else:
|
554
|
+
self._message_abort_listening_queue = _queue = None
|
555
|
+
_interceptor_blocks = message_interceptor_blocks
|
556
|
+
_black_list = [] if social_black_list is None else social_black_list
|
557
|
+
_llm_config = self.config.get("llm_request", {})
|
558
|
+
if message_interceptor_blocks is not None:
|
559
|
+
_num_interceptors = min(1, message_interceptors)
|
560
|
+
self._message_interceptors = _interceptors = [
|
561
|
+
MessageInterceptor.remote(
|
562
|
+
_interceptor_blocks, # type:ignore
|
563
|
+
_black_list,
|
564
|
+
_llm_config,
|
565
|
+
_queue,
|
566
|
+
)
|
567
|
+
for _ in range(_num_interceptors)
|
568
|
+
]
|
569
|
+
else:
|
570
|
+
_num_interceptors = 1
|
571
|
+
self._message_interceptors = _interceptors = [
|
572
|
+
None for _ in range(_num_interceptors)
|
573
|
+
]
|
518
574
|
creation_tasks = []
|
519
575
|
for i, (
|
520
576
|
agent_class,
|
@@ -529,11 +585,14 @@ class AgentSimulation:
|
|
529
585
|
number_of_agents,
|
530
586
|
memory_config_function_group,
|
531
587
|
self.config,
|
588
|
+
self.exp_name,
|
532
589
|
self.exp_id,
|
533
590
|
self.enable_avro,
|
534
591
|
self.avro_path,
|
535
592
|
self.enable_pgsql,
|
536
593
|
_workers[i % _num_workers], # type:ignore
|
594
|
+
self.message_interceptor,
|
595
|
+
mlflow_run_id,
|
537
596
|
embedding_model,
|
538
597
|
self.logging_level,
|
539
598
|
config_file,
|
@@ -564,11 +623,15 @@ class AgentSimulation:
|
|
564
623
|
for group in self._groups.values():
|
565
624
|
init_tasks.append(group.init_agents.remote())
|
566
625
|
ray.get(init_tasks)
|
567
|
-
await self.messager.connect.remote()
|
568
|
-
await self.messager.subscribe.remote(
|
569
|
-
|
626
|
+
await self.messager.connect.remote() # type:ignore
|
627
|
+
await self.messager.subscribe.remote( # type:ignore
|
628
|
+
[(f"exps/{self.exp_id}/user_payback", 1)], [self.exp_id]
|
629
|
+
)
|
630
|
+
await self.messager.start_listening.remote() # type:ignore
|
570
631
|
|
571
|
-
async def gather(
|
632
|
+
async def gather(
|
633
|
+
self, content: str, target_agent_uuids: Optional[list[str]] = None
|
634
|
+
):
|
572
635
|
"""收集智能体的特定信息"""
|
573
636
|
gather_tasks = []
|
574
637
|
for group in self._groups.values():
|
@@ -612,12 +675,13 @@ class AgentSimulation:
|
|
612
675
|
self, survey: Survey, agent_uuids: Optional[list[str]] = None
|
613
676
|
):
|
614
677
|
"""发送问卷"""
|
678
|
+
await self.messager.connect.remote() # type:ignore
|
615
679
|
survey_dict = survey.to_dict()
|
616
680
|
if agent_uuids is None:
|
617
681
|
agent_uuids = self._agent_uuids
|
618
682
|
_date_time = datetime.now(timezone.utc)
|
619
683
|
payload = {
|
620
|
-
"from":
|
684
|
+
"from": SURVEY_SENDER_UUID,
|
621
685
|
"survey_id": survey_dict["id"],
|
622
686
|
"timestamp": int(_date_time.timestamp() * 1000),
|
623
687
|
"data": survey_dict,
|
@@ -625,10 +689,10 @@ class AgentSimulation:
|
|
625
689
|
}
|
626
690
|
for uuid in agent_uuids:
|
627
691
|
topic = self._user_survey_topics[uuid]
|
628
|
-
await self.messager.send_message.remote(topic, payload)
|
692
|
+
await self.messager.send_message.remote(topic, payload) # type:ignore
|
629
693
|
remain_payback = len(agent_uuids)
|
630
694
|
while True:
|
631
|
-
messages = await self.messager.fetch_messages.remote()
|
695
|
+
messages = await self.messager.fetch_messages.remote() # type:ignore
|
632
696
|
logger.info(f"Received {len(messages)} payback messages [survey]")
|
633
697
|
remain_payback -= len(messages)
|
634
698
|
if remain_payback <= 0:
|
@@ -641,7 +705,7 @@ class AgentSimulation:
|
|
641
705
|
"""发送采访消息"""
|
642
706
|
_date_time = datetime.now(timezone.utc)
|
643
707
|
payload = {
|
644
|
-
"from":
|
708
|
+
"from": SURVEY_SENDER_UUID,
|
645
709
|
"content": content,
|
646
710
|
"timestamp": int(_date_time.timestamp() * 1000),
|
647
711
|
"_date_time": _date_time,
|
@@ -650,19 +714,19 @@ class AgentSimulation:
|
|
650
714
|
agent_uuids = [agent_uuids]
|
651
715
|
for uuid in agent_uuids:
|
652
716
|
topic = self._user_chat_topics[uuid]
|
653
|
-
await self.messager.send_message.remote(topic, payload)
|
717
|
+
await self.messager.send_message.remote(topic, payload) # type:ignore
|
654
718
|
remain_payback = len(agent_uuids)
|
655
719
|
while True:
|
656
|
-
messages = await self.messager.fetch_messages.remote()
|
720
|
+
messages = await self.messager.fetch_messages.remote() # type:ignore
|
657
721
|
logger.info(f"Received {len(messages)} payback messages [interview]")
|
658
722
|
remain_payback -= len(messages)
|
659
723
|
if remain_payback <= 0:
|
660
724
|
break
|
661
725
|
await asyncio.sleep(3)
|
662
726
|
|
663
|
-
async def extract_metric(self,
|
727
|
+
async def extract_metric(self, metric_extractors: list[Callable]):
|
664
728
|
"""提取指标"""
|
665
|
-
for metric_extractor in
|
729
|
+
for metric_extractor in metric_extractors:
|
666
730
|
await metric_extractor(self)
|
667
731
|
|
668
732
|
async def step(self):
|
@@ -670,7 +734,9 @@ class AgentSimulation:
|
|
670
734
|
try:
|
671
735
|
# check whether insert agents
|
672
736
|
simulator_day = await self._simulator.get_simulator_day()
|
673
|
-
print(
|
737
|
+
print(
|
738
|
+
f"simulator_day: {simulator_day}, self._simulator_day: {self._simulator_day}"
|
739
|
+
)
|
674
740
|
need_insert_agents = False
|
675
741
|
if simulator_day > self._simulator_day:
|
676
742
|
need_insert_agents = True
|
@@ -698,11 +764,14 @@ class AgentSimulation:
|
|
698
764
|
if self.metric_extractor is not None:
|
699
765
|
print(f"total_steps: {self._total_steps}, excute metric")
|
700
766
|
to_excute_metric = [
|
701
|
-
metric[1]
|
767
|
+
metric[1]
|
768
|
+
for metric in self.metric_extractor
|
769
|
+
if self._total_steps % metric[0] == 0
|
702
770
|
]
|
703
771
|
await self.extract_metric(to_excute_metric)
|
704
772
|
except Exception as e:
|
705
773
|
import traceback
|
774
|
+
|
706
775
|
logger.error(f"模拟器运行错误: {str(e)}\n{traceback.format_exc()}")
|
707
776
|
raise RuntimeError(str(e)) from e
|
708
777
|
|
@@ -721,10 +790,12 @@ class AgentSimulation:
|
|
721
790
|
monitor_task = asyncio.create_task(self._monitor_exp_status(stop_event))
|
722
791
|
|
723
792
|
try:
|
724
|
-
end_time =
|
793
|
+
end_time = (
|
794
|
+
await self._simulator.get_time() + day * 24 * 3600
|
795
|
+
) # type:ignore
|
725
796
|
while True:
|
726
797
|
current_time = await self._simulator.get_time()
|
727
|
-
if current_time >= end_time:
|
798
|
+
if current_time >= end_time: # type:ignore
|
728
799
|
break
|
729
800
|
await self.step()
|
730
801
|
finally:
|
@@ -71,11 +71,11 @@ class PgWriter:
|
|
71
71
|
|
72
72
|
@lock_decorator
|
73
73
|
async def async_write_status(self, rows: list[tuple]):
|
74
|
-
_tuple_types = [str, int, float, float, float, int, str, str, None]
|
74
|
+
_tuple_types = [str, int, float, float, float, int, list, str, str, None]
|
75
75
|
table_name = f"socialcity_{self.exp_id.replace('-', '_')}_agent_status"
|
76
76
|
async with await psycopg.AsyncConnection.connect(self._dsn) as aconn:
|
77
77
|
copy_sql = psycopg.sql.SQL(
|
78
|
-
"COPY {} (id, day, t, lng, lat, parent_id, action, status, created_at) FROM STDIN"
|
78
|
+
"COPY {} (id, day, t, lng, lat, parent_id, friend_ids, action, status, created_at) FROM STDIN"
|
79
79
|
).format(psycopg.sql.Identifier(table_name))
|
80
80
|
_rows: list[Any] = []
|
81
81
|
async with aconn.cursor() as cur:
|
pycityagent/utils/__init__.py
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
from .avro_schema import (DIALOG_SCHEMA, INSTITUTION_STATUS_SCHEMA,
|
2
2
|
PROFILE_SCHEMA, STATUS_SCHEMA, SURVEY_SCHEMA)
|
3
3
|
from .pg_query import PGSQL_DICT, TO_UPDATE_EXP_INFO_KEYS_AND_TYPES
|
4
|
-
from .survey_util import process_survey_for_llm
|
4
|
+
from .survey_util import SURVEY_SENDER_UUID, process_survey_for_llm
|
5
5
|
|
6
6
|
__all__ = [
|
7
|
-
"PROFILE_SCHEMA",
|
7
|
+
"PROFILE_SCHEMA",
|
8
|
+
"DIALOG_SCHEMA",
|
9
|
+
"STATUS_SCHEMA",
|
10
|
+
"SURVEY_SCHEMA",
|
11
|
+
"INSTITUTION_STATUS_SCHEMA",
|
8
12
|
"process_survey_for_llm",
|
9
13
|
"TO_UPDATE_EXP_INFO_KEYS_AND_TYPES",
|
10
14
|
"PGSQL_DICT",
|
15
|
+
"SURVEY_SENDER_UUID",
|
11
16
|
]
|
pycityagent/utils/pg_query.py
CHANGED
pycityagent/utils/survey_util.py
CHANGED
@@ -8,40 +8,40 @@ Survey Description: {survey_dict['description']}
|
|
8
8
|
Please answer each question in the following format:
|
9
9
|
|
10
10
|
"""
|
11
|
-
|
11
|
+
|
12
12
|
question_count = 1
|
13
|
-
for page in survey_dict[
|
14
|
-
for question in page[
|
13
|
+
for page in survey_dict["pages"]:
|
14
|
+
for question in page["elements"]:
|
15
15
|
prompt += f"Question {question_count}: {question['title']}\n"
|
16
|
-
|
16
|
+
|
17
17
|
# 根据不同类型的问题生成不同的提示
|
18
|
-
if question[
|
19
|
-
prompt += "Options: " + ", ".join(question[
|
18
|
+
if question["type"] == "radiogroup":
|
19
|
+
prompt += "Options: " + ", ".join(question["choices"]) + "\n"
|
20
20
|
prompt += "Please select ONE option\n"
|
21
|
-
|
22
|
-
elif question[
|
23
|
-
prompt += "Options: " + ", ".join(question[
|
21
|
+
|
22
|
+
elif question["type"] == "checkbox":
|
23
|
+
prompt += "Options: " + ", ".join(question["choices"]) + "\n"
|
24
24
|
prompt += "You can select MULTIPLE options\n"
|
25
|
-
|
26
|
-
elif question[
|
25
|
+
|
26
|
+
elif question["type"] == "rating":
|
27
27
|
prompt += f"Rating range: {question.get('min_rating', 1)} - {question.get('max_rating', 5)}\n"
|
28
28
|
prompt += "Please provide a rating within the range\n"
|
29
|
-
|
30
|
-
elif question[
|
31
|
-
prompt += "Rows: " + ", ".join(question[
|
32
|
-
prompt += "Columns: " + ", ".join(question[
|
29
|
+
|
30
|
+
elif question["type"] == "matrix":
|
31
|
+
prompt += "Rows: " + ", ".join(question["rows"]) + "\n"
|
32
|
+
prompt += "Columns: " + ", ".join(question["columns"]) + "\n"
|
33
33
|
prompt += "Please select ONE column option for EACH row\n"
|
34
|
-
|
35
|
-
elif question[
|
34
|
+
|
35
|
+
elif question["type"] == "text":
|
36
36
|
prompt += "Please provide a text response\n"
|
37
|
-
|
38
|
-
elif question[
|
37
|
+
|
38
|
+
elif question["type"] == "boolean":
|
39
39
|
prompt += "Options: Yes, No\n"
|
40
40
|
prompt += "Please select either Yes or No\n"
|
41
|
-
|
41
|
+
|
42
42
|
prompt += "\nAnswer: [Your response here]\n\n---\n\n"
|
43
43
|
question_count += 1
|
44
|
-
|
44
|
+
|
45
45
|
# 添加总结提示
|
46
46
|
prompt += """Please ensure:
|
47
47
|
1. All required questions are answered
|
@@ -49,5 +49,8 @@ Please answer each question in the following format:
|
|
49
49
|
3. Answers are clear and specific
|
50
50
|
|
51
51
|
Format your responses exactly as requested above."""
|
52
|
-
|
53
|
-
return prompt
|
52
|
+
|
53
|
+
return prompt
|
54
|
+
|
55
|
+
|
56
|
+
SURVEY_SENDER_UUID = "none"
|
pycityagent/workflow/block.py
CHANGED
@@ -187,7 +187,7 @@ class Block:
|
|
187
187
|
|
188
188
|
@classmethod
|
189
189
|
def import_config(cls, config: dict[str, Union[str, dict]]) -> Block:
|
190
|
-
instance = cls(name=config["name"])
|
190
|
+
instance = cls(name=config["name"]) # type: ignore
|
191
191
|
assert isinstance(config["config"], dict)
|
192
192
|
for field, value in config["config"].items():
|
193
193
|
if field in cls.configurable_fields:
|
@@ -195,12 +195,12 @@ class Block:
|
|
195
195
|
|
196
196
|
# 递归创建子Block
|
197
197
|
for child_config in config.get("children", []):
|
198
|
-
child_block = Block.import_config(child_config)
|
198
|
+
child_block = Block.import_config(child_config) # type: ignore
|
199
199
|
setattr(instance, child_block.name.lower(), child_block)
|
200
200
|
|
201
201
|
return instance
|
202
202
|
|
203
|
-
def load_from_config(self, config: dict[str, list[
|
203
|
+
def load_from_config(self, config: dict[str, list[dict]]) -> None:
|
204
204
|
"""
|
205
205
|
使用配置更新当前Block实例的参数,并递归更新子Block。
|
206
206
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: pycityagent
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0a54
|
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
|
@@ -45,7 +45,7 @@ Requires-Dist: openai>=1.58.1
|
|
45
45
|
Requires-Dist: Pillow<12.0.0,>=11.0.0
|
46
46
|
Requires-Dist: protobuf<5.0.0,<=4.24.0
|
47
47
|
Requires-Dist: pycitydata>=1.0.3
|
48
|
-
Requires-Dist: pycityproto>=2.
|
48
|
+
Requires-Dist: pycityproto>=2.2.0
|
49
49
|
Requires-Dist: requests>=2.32.3
|
50
50
|
Requires-Dist: Shapely>=2.0.6
|
51
51
|
Requires-Dist: PyYAML>=6.0.2
|
@@ -1,9 +1,3 @@
|
|
1
|
-
pycityagent-2.0.0a53.dist-info/RECORD,,
|
2
|
-
pycityagent-2.0.0a53.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
3
|
-
pycityagent-2.0.0a53.dist-info/WHEEL,sha256=ezfKMaDztqf77C8lvQ0NCnZxkTaOaKLprqJ8q932MhU,109
|
4
|
-
pycityagent-2.0.0a53.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
5
|
-
pycityagent-2.0.0a53.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
6
|
-
pycityagent-2.0.0a53.dist-info/METADATA,sha256=7iSDzvMMlwpY7leIIjVm-3V7lZ92R0uHetTQlk0PCb0,9110
|
7
1
|
pycityagent/pycityagent-sim,sha256=1Nu-QYC0AuZyVWciGNa2XkYsUntbwAS15Bo7l-y6eok,35449490
|
8
2
|
pycityagent/__init__.py,sha256=PUKWTXc-xdMG7px8oTNclodsILUgypANj2Z647sY63k,808
|
9
3
|
pycityagent/pycityagent-ui,sha256=cHZjqtrQ4Fh4qtRahFNCNbT2DNHLmUexiDAa-72Z3RQ,40333378
|
@@ -11,15 +5,15 @@ pycityagent/metrics/mlflow_client.py,sha256=g_tHxWkWTDijtbGL74-HmiYzWVKb1y8-w12Q
|
|
11
5
|
pycityagent/metrics/__init__.py,sha256=X08PaBbGVAd7_PRGLREXWxaqm7nS82WBQpD1zvQzcqc,128
|
12
6
|
pycityagent/metrics/utils/const.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
7
|
pycityagent/economy/__init__.py,sha256=aonY4WHnx-6EGJ4WKrx4S-2jAkYNLtqUA04jp6q8B7w,75
|
14
|
-
pycityagent/economy/econ_client.py,sha256=
|
8
|
+
pycityagent/economy/econ_client.py,sha256=Nf73GPFJgiDbisi8ghmv_Dz6iUlNE2Ey62B-eJ-tQ84,12186
|
15
9
|
pycityagent/tools/__init__.py,sha256=XtdtGyWeFyK1YOUvWkykBWxemtmwQjWUIuuyU1-gosQ,261
|
16
10
|
pycityagent/tools/tool.py,sha256=D-ESFlX7EESm5mcvs2zRlGEQTzXbVfQc8G7Vpz8TmAw,8651
|
17
11
|
pycityagent/llm/llmconfig.py,sha256=4Ylf4OFSBEFy8jrOneeX0HvPhWEaF5jGvy1HkXK08Ro,436
|
18
12
|
pycityagent/llm/__init__.py,sha256=iWs6FLgrbRVIiqOf4ILS89gkVCTvS7HFC3vG-MWuyko,205
|
19
|
-
pycityagent/llm/llm.py,sha256=
|
13
|
+
pycityagent/llm/llm.py,sha256=4AJlTj9llT909gzx9SfcBvbUJrWqHzEo3DaHWgQ3-3I,15852
|
20
14
|
pycityagent/llm/embeddings.py,sha256=2_P4TWm3sJKFdGDx2Q1a2AEapFopDctIXsGuntvmP6E,6816
|
21
15
|
pycityagent/llm/utils.py,sha256=hoNPhvomb1u6lhFX0GctFipw74hVKb7bvUBDqwBzBYw,160
|
22
|
-
pycityagent/memory/memory.py,sha256=
|
16
|
+
pycityagent/memory/memory.py,sha256=MusbnD-Us5IF16CkYRSlcer-TEbaPsHxQEYzcugo0N4,34589
|
23
17
|
pycityagent/memory/profile.py,sha256=q8ZS9IBmHCg_X1GONUvXK85P6tCepTKQgXKuvuXYNXw,5203
|
24
18
|
pycityagent/memory/__init__.py,sha256=_Vfdo1HcLWsuuz34_i8e91nnLVYADpMlHHSVaB3xgIk,297
|
25
19
|
pycityagent/memory/memory_base.py,sha256=QG_j3BxZvkadFEeE3uBR_kjl_xcXD1aHUVs8GEF3d6w,5654
|
@@ -28,31 +22,32 @@ pycityagent/memory/utils.py,sha256=oJWLdPeJy_jcdKcDTo9JAH9kDZhqjoQhhv_zT9qWC0w,8
|
|
28
22
|
pycityagent/memory/const.py,sha256=6zpJPJXWoH9-yf4RARYYff586agCoud9BRn7sPERB1g,932
|
29
23
|
pycityagent/memory/faiss_query.py,sha256=V3rIw6d1_xcpNqZBbAYz3qfjVNE7NfJ7xOS5SibPtVU,13180
|
30
24
|
pycityagent/memory/state.py,sha256=TYItiyDtehMEQaSBN7PpNrnNxdDM5jGppr9R9Ufv3kA,5134
|
31
|
-
pycityagent/simulation/simulation.py,sha256=
|
25
|
+
pycityagent/simulation/simulation.py,sha256=mgzghIaud8M-gUjTlA8vRZ7X7l3UJgXBRm68cT0Fy18,32781
|
32
26
|
pycityagent/simulation/__init__.py,sha256=P5czbcg2d8S0nbbnsQXFIhwzO4CennAhZM8OmKvAeYw,194
|
33
|
-
pycityagent/simulation/agentgroup.py,sha256=
|
34
|
-
pycityagent/simulation/storage/pg.py,sha256=
|
35
|
-
pycityagent/message/
|
36
|
-
pycityagent/message/
|
27
|
+
pycityagent/simulation/agentgroup.py,sha256=ANTQA2OFQpuNZBz2VRhy60pTPUM1lXHFJLzFgK1SvxQ,31633
|
28
|
+
pycityagent/simulation/storage/pg.py,sha256=xRshSOGttW-p0re0fNBOjOpb-nQ5msIE2LsdT79_E_Y,8425
|
29
|
+
pycityagent/message/message_interceptor.py,sha256=w8XTyZStQtMjILpeAX3VMhAWcYAuaxCgSMwXQU1OryM,8951
|
30
|
+
pycityagent/message/__init__.py,sha256=f5QH7DKPqEAMyfSlBMnl3uouOKlsoel909STlIe7nUk,276
|
31
|
+
pycityagent/message/messager.py,sha256=8mhTU2bb9K405_lwd9tN2ha7cCQ9m6hPFxf2fYxRjVg,4368
|
37
32
|
pycityagent/utils/avro_schema.py,sha256=AlADbzV8FxiSfvhQhiX9KhrwMjrx0lGT-lED4TI1gJM,4152
|
38
|
-
pycityagent/utils/__init__.py,sha256=
|
39
|
-
pycityagent/utils/survey_util.py,sha256=
|
40
|
-
pycityagent/utils/pg_query.py,sha256=
|
33
|
+
pycityagent/utils/__init__.py,sha256=GQEa4x_uJBK19Z57vfm9Omvqg1c4ysi3QJ9wx8xiDhI,524
|
34
|
+
pycityagent/utils/survey_util.py,sha256=o-gvmmfus3vMIN-EMWPzfLbHkDH4DfZb8B-yBd_mGYk,2076
|
35
|
+
pycityagent/utils/pg_query.py,sha256=KAcnBDLyzUu2il18SGXxk8dySdBen_8ejfpxiWuKUMA,2225
|
41
36
|
pycityagent/utils/decorators.py,sha256=Gk3r41hfk6awui40tbwpq3C7wC7jHaRmLRlcJFlLQCE,3160
|
42
37
|
pycityagent/utils/parsers/__init__.py,sha256=AN2xgiPxszWK4rpX7zrqRsqNwfGF3WnCA5-PFTvbaKk,281
|
43
38
|
pycityagent/utils/parsers/code_block_parser.py,sha256=Cs2Z_hm9VfNCpPPll1TwteaJF-HAQPs-3RApsOekFm4,1173
|
44
39
|
pycityagent/utils/parsers/parser_base.py,sha256=KBKO4zLZPNdGjPAGqIus8LseZ8W3Tlt2y0QxqeCd25Q,1713
|
45
40
|
pycityagent/utils/parsers/json_parser.py,sha256=tjwyPluYfkWgsvLi0hzfJwFhO3L6yQfZMKza20HaGrY,2911
|
46
|
-
pycityagent/agent/agent_base.py,sha256=
|
41
|
+
pycityagent/agent/agent_base.py,sha256=vC1nMWahwi_nVBUXVdC1CnZpqimKZApixD2m2Iqu_bg,24196
|
47
42
|
pycityagent/agent/__init__.py,sha256=U20yKu9QwSqAx_PHk5JwipfODkDfxONtumVfnsKjWFg,180
|
48
|
-
pycityagent/agent/agent.py,sha256=
|
49
|
-
pycityagent/cli/wrapper.py,sha256=
|
43
|
+
pycityagent/agent/agent.py,sha256=FNon_OPvGrh976AEHpaAQyLQN7erbGOX-BxGnCVZza8,12038
|
44
|
+
pycityagent/cli/wrapper.py,sha256=9aG6D2cnmh6aIhiVXKPGKuMjVcdAa-TwzANudb2q_FU,1147
|
50
45
|
pycityagent/workflow/__init__.py,sha256=H08Ko3eliZvuuCMajbEri-IP4-SeswYU6UjHBNA4Ze0,490
|
51
46
|
pycityagent/workflow/prompt.py,sha256=6jI0Rq54JLv3-IXqZLYug62vse10wTI83xvf4ZX42nk,2929
|
52
|
-
pycityagent/workflow/block.py,sha256=
|
47
|
+
pycityagent/workflow/block.py,sha256=4QufS8XnyP6SYp8g1gDODW-H0nAHA7lvivrPGUq1p-w,9922
|
53
48
|
pycityagent/workflow/trigger.py,sha256=Df-MOBEDWBbM-v0dFLQLXteLsipymT4n8vqexmK2GiQ,5643
|
54
|
-
pycityagent/environment/__init__.py,sha256=
|
55
|
-
pycityagent/environment/simulator.py,sha256=
|
49
|
+
pycityagent/environment/__init__.py,sha256=MyZBwsweDIHOKSX2iSZs748foNtaiyEcyg6sc747T2g,263
|
50
|
+
pycityagent/environment/simulator.py,sha256=gqkECMzhXRh4WHTyLFEL1_X1R7F1aX4g9881zUFv7DI,12136
|
56
51
|
pycityagent/environment/message/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
52
|
pycityagent/environment/utils/port.py,sha256=3OM6kSUt3PxvDUOlgyiendBtETaWU8Mzk_8H0TzTmYg,295
|
58
53
|
pycityagent/environment/utils/grpc.py,sha256=6EJwKXXktIWb1NcUiJzIRmfrY0S03QAXXGcCDHqAT00,1998
|
@@ -69,7 +64,7 @@ pycityagent/environment/sidecar/sidecarv2.py,sha256=beKlYZgt38EQbV1x6NWQo7xVXyB-
|
|
69
64
|
pycityagent/environment/sim/pause_service.py,sha256=DcAOVRxNkHGk4jyzFkxHMUPgp0Ck4mYHoPh6qxjhhLQ,1744
|
70
65
|
pycityagent/environment/sim/person_service.py,sha256=5r1F2Itn7dKJ2U4hSLovrk5p4qy-2n77MTAv_OlTIwA,10673
|
71
66
|
pycityagent/environment/sim/aoi_service.py,sha256=2UjvUTF4CW4E_L30IRcdwv6t_q1ZdXN3TTLOKSOaaXE,1230
|
72
|
-
pycityagent/environment/sim/sim_env.py,sha256=
|
67
|
+
pycityagent/environment/sim/sim_env.py,sha256=V3Pf_nsebs07-ZaXPSCaA1HBGv4n7v8yxMz6GKQaZPk,3908
|
73
68
|
pycityagent/environment/sim/lane_service.py,sha256=N2dUe-3XuqqKLsNXt1k4NN8uV-J_ruo08yhaUd_hwOI,3916
|
74
69
|
pycityagent/environment/sim/client.py,sha256=j0f8qjR1nIava4VkoZNEPqW5h08WPdcC5wzM9DP3tIs,3772
|
75
70
|
pycityagent/environment/sim/__init__.py,sha256=JVG6sSD2Hbohl1TtKjuQi7_M7tKMrFh9vl3QV3VA5O0,724
|
@@ -86,7 +81,8 @@ pycityagent/cityagent/__init__.py,sha256=gcBQ-a50XegFtjigQ7xDXRBZrywBKqifiQFSRnE
|
|
86
81
|
pycityagent/cityagent/firmagent.py,sha256=UVlNN0lpa4cC4PZVqYzQhbc5VJ2oGsA1731mhbCjnR8,4109
|
87
82
|
pycityagent/cityagent/nbsagent.py,sha256=WIXW__6dZ5IrqBqDCjvGbrCshpXzuFRV3Ww6gkYw7p4,4387
|
88
83
|
pycityagent/cityagent/initial.py,sha256=7hgCt_tGdnVTXGfEQOn1GTW5dAs1b-ru_FwXxRLI6tM,4549
|
89
|
-
pycityagent/cityagent/societyagent.py,sha256=
|
84
|
+
pycityagent/cityagent/societyagent.py,sha256=vvFGAr8wlZ82f4qHvpawa1VsHungDegjKn1E51bDUnc,24767
|
85
|
+
pycityagent/cityagent/message_intercept.py,sha256=HiNOtBXKq40LCmvsw2KMLxMsbmXSVcbRytAO-eI-1sU,3279
|
90
86
|
pycityagent/cityagent/governmentagent.py,sha256=HJLuhvEmllu_1KnFEJsYCIasaBJT0BV9Cn_4Y2QGPqg,2791
|
91
87
|
pycityagent/cityagent/blocks/dispatcher.py,sha256=mEa1r3tRS3KI1BMZR_w_sbUGzOj6aUJuiUrsHv1n2n0,2943
|
92
88
|
pycityagent/cityagent/blocks/needs_block.py,sha256=s8LikgtKORfo_Sw9SQ5_3biNPTof15QuUs4cDynXCyM,15332
|
@@ -96,8 +92,14 @@ pycityagent/cityagent/blocks/__init__.py,sha256=wydR0s-cCRWgdvQetkfQnD_PU8vC3eTm
|
|
96
92
|
pycityagent/cityagent/blocks/economy_block.py,sha256=m5B67cgGZ9nKWtrYeak5gxMoCoKlRbATAsXpFajYKyg,19129
|
97
93
|
pycityagent/cityagent/blocks/utils.py,sha256=8O5p1B8JlreIJTGXKAP03rTcn7MvFSR8qJ1_hhszboU,2065
|
98
94
|
pycityagent/cityagent/blocks/other_block.py,sha256=NnDwxQAO5XZ7Uxe-n3qtrfNItHlwFYk2MQsh2GYDKMQ,4338
|
99
|
-
pycityagent/cityagent/blocks/plan_block.py,sha256=
|
95
|
+
pycityagent/cityagent/blocks/plan_block.py,sha256=YEU0pHK_fB1lvvml9u7bGz-2bzM2axE9jW-aSgPYs6M,10996
|
100
96
|
pycityagent/cityagent/blocks/mobility_block.py,sha256=xWbARMfJ3-6fddrW3VOUKJrXfMGmroiSN0B8t8lVYXA,12725
|
101
97
|
pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
|
102
98
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
103
99
|
pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
|
100
|
+
pycityagent-2.0.0a54.dist-info/RECORD,,
|
101
|
+
pycityagent-2.0.0a54.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
102
|
+
pycityagent-2.0.0a54.dist-info/WHEEL,sha256=ezfKMaDztqf77C8lvQ0NCnZxkTaOaKLprqJ8q932MhU,109
|
103
|
+
pycityagent-2.0.0a54.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
104
|
+
pycityagent-2.0.0a54.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
105
|
+
pycityagent-2.0.0a54.dist-info/METADATA,sha256=rziSp1wXuaGcNbO3WTqNx6s7JqARZxLvFeNLvsChKUo,9110
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|