pycityagent 2.0.0a18__py3-none-any.whl → 2.0.0a20__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/agent.py +126 -100
- pycityagent/economy/econ_client.py +39 -2
- pycityagent/environment/simulator.py +2 -2
- pycityagent/environment/utils/geojson.py +1 -3
- pycityagent/environment/utils/map_utils.py +15 -15
- pycityagent/llm/embedding.py +8 -9
- pycityagent/llm/llm.py +5 -5
- pycityagent/memory/memory.py +23 -22
- pycityagent/metrics/__init__.py +6 -0
- pycityagent/metrics/mlflow_client.py +147 -0
- pycityagent/metrics/utils/const.py +0 -0
- pycityagent/simulation/agentgroup.py +58 -21
- pycityagent/simulation/simulation.py +114 -38
- pycityagent/utils/parsers/parser_base.py +1 -1
- pycityagent/workflow/__init__.py +5 -3
- pycityagent/workflow/block.py +2 -3
- pycityagent/workflow/prompt.py +6 -6
- pycityagent/workflow/tool.py +53 -4
- pycityagent/workflow/trigger.py +2 -2
- {pycityagent-2.0.0a18.dist-info → pycityagent-2.0.0a20.dist-info}/METADATA +4 -2
- {pycityagent-2.0.0a18.dist-info → pycityagent-2.0.0a20.dist-info}/RECORD +22 -19
- {pycityagent-2.0.0a18.dist-info → pycityagent-2.0.0a20.dist-info}/WHEEL +0 -0
@@ -3,23 +3,25 @@ import json
|
|
3
3
|
import logging
|
4
4
|
import os
|
5
5
|
import random
|
6
|
+
import time
|
6
7
|
import uuid
|
7
|
-
from collections.abc import Sequence
|
8
|
+
from collections.abc import Callable, Sequence
|
8
9
|
from concurrent.futures import ThreadPoolExecutor
|
9
10
|
from datetime import datetime, timezone
|
10
11
|
from pathlib import Path
|
11
|
-
from typing import Any,
|
12
|
+
from typing import Any, Optional, Union
|
12
13
|
|
13
14
|
import pycityproto.city.economy.v2.economy_pb2 as economyv2
|
15
|
+
import ray
|
14
16
|
import yaml
|
15
17
|
from mosstool.map._map_util.const import AOI_START_ID
|
16
18
|
|
17
|
-
from pycityagent.environment.simulator import Simulator
|
18
|
-
from pycityagent.memory.memory import Memory
|
19
|
-
from pycityagent.message.messager import Messager
|
20
|
-
from pycityagent.survey import Survey
|
21
|
-
|
22
19
|
from ..agent import Agent, InstitutionAgent
|
20
|
+
from ..environment.simulator import Simulator
|
21
|
+
from ..memory.memory import Memory
|
22
|
+
from ..message.messager import Messager
|
23
|
+
from ..metrics import init_mlflow_connection
|
24
|
+
from ..survey import Survey
|
23
25
|
from .agentgroup import AgentGroup
|
24
26
|
|
25
27
|
logger = logging.getLogger("pycityagent")
|
@@ -50,15 +52,16 @@ class AgentSimulation:
|
|
50
52
|
self.agent_class = [agent_class]
|
51
53
|
self.logging_level = logging_level
|
52
54
|
self.config = config
|
55
|
+
self.exp_name = exp_name
|
53
56
|
self._simulator = Simulator(config["simulator_request"])
|
54
57
|
self.agent_prefix = agent_prefix
|
55
|
-
self._agents:
|
56
|
-
self._groups:
|
57
|
-
self._agent_uuid2group:
|
58
|
-
self._agent_uuids:
|
59
|
-
self._user_chat_topics:
|
60
|
-
self._user_survey_topics:
|
61
|
-
self._user_interview_topics:
|
58
|
+
self._agents: dict[uuid.UUID, Agent] = {}
|
59
|
+
self._groups: dict[str, AgentGroup] = {} # type:ignore
|
60
|
+
self._agent_uuid2group: dict[uuid.UUID, AgentGroup] = {} # type:ignore
|
61
|
+
self._agent_uuids: list[uuid.UUID] = []
|
62
|
+
self._user_chat_topics: dict[uuid.UUID, str] = {}
|
63
|
+
self._user_survey_topics: dict[uuid.UUID, str] = {}
|
64
|
+
self._user_interview_topics: dict[uuid.UUID, str] = {}
|
62
65
|
self._loop = asyncio.get_event_loop()
|
63
66
|
|
64
67
|
self._messager = Messager(
|
@@ -69,18 +72,37 @@ class AgentSimulation:
|
|
69
72
|
)
|
70
73
|
asyncio.create_task(self._messager.connect())
|
71
74
|
|
72
|
-
|
75
|
+
# storage
|
76
|
+
_storage_config: dict[str, Any] = config.get("storage", {})
|
77
|
+
# avro
|
78
|
+
_avro_config: dict[str, Any] = _storage_config.get("avro", {})
|
79
|
+
self._enable_avro = _avro_config.get("enabled", False)
|
73
80
|
if not self._enable_avro:
|
81
|
+
self._avro_path = None
|
74
82
|
logger.warning("AVRO is not enabled, NO AVRO LOCAL STORAGE")
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
self.
|
82
|
-
self.
|
83
|
-
|
83
|
+
else:
|
84
|
+
self._avro_path = Path(_avro_config["path"]) / f"{self.exp_id}"
|
85
|
+
self._avro_path.mkdir(parents=True, exist_ok=True)
|
86
|
+
|
87
|
+
# pg
|
88
|
+
_pgsql_config: dict[str, Any] = _storage_config.get("pgsql", {})
|
89
|
+
self._enable_pgsql = _pgsql_config.get("enabled", False)
|
90
|
+
if not self._enable_pgsql:
|
91
|
+
logger.warning("PostgreSQL is not enabled, NO POSTGRESQL DATABASE STORAGE")
|
92
|
+
self._pgsql_args = ("", "", "", "", "")
|
93
|
+
else:
|
94
|
+
self._pgsql_host = _pgsql_config["host"]
|
95
|
+
self._pgsql_port = _pgsql_config["port"]
|
96
|
+
self._pgsql_database = _pgsql_config["database"]
|
97
|
+
self._pgsql_user = _pgsql_config.get("user", None)
|
98
|
+
self._pgsql_password = _pgsql_config.get("password", None)
|
99
|
+
self._pgsql_args: tuple[str, str, str, str, str] = (
|
100
|
+
self._pgsql_host,
|
101
|
+
self._pgsql_port,
|
102
|
+
self._pgsql_database,
|
103
|
+
self._pgsql_user,
|
104
|
+
self._pgsql_password,
|
105
|
+
)
|
84
106
|
|
85
107
|
# 添加实验信息相关的属性
|
86
108
|
self._exp_info = {
|
@@ -96,14 +118,34 @@ class AgentSimulation:
|
|
96
118
|
}
|
97
119
|
|
98
120
|
# 创建异步任务保存实验信息
|
99
|
-
|
100
|
-
|
101
|
-
|
121
|
+
if self._enable_avro:
|
122
|
+
assert self._avro_path is not None
|
123
|
+
self._exp_info_file = self._avro_path / "experiment_info.yaml"
|
124
|
+
with open(self._exp_info_file, "w") as f:
|
125
|
+
yaml.dump(self._exp_info, f)
|
126
|
+
|
127
|
+
@property
|
128
|
+
def enable_avro(
|
129
|
+
self,
|
130
|
+
) -> bool:
|
131
|
+
return self._enable_avro
|
132
|
+
|
133
|
+
@property
|
134
|
+
def enable_pgsql(
|
135
|
+
self,
|
136
|
+
) -> bool:
|
137
|
+
return self._enable_pgsql
|
102
138
|
|
103
139
|
@property
|
104
|
-
def agents(self):
|
140
|
+
def agents(self) -> dict[uuid.UUID, Agent]:
|
105
141
|
return self._agents
|
106
142
|
|
143
|
+
@property
|
144
|
+
def avro_path(
|
145
|
+
self,
|
146
|
+
) -> Path:
|
147
|
+
return self._avro_path # type:ignore
|
148
|
+
|
107
149
|
@property
|
108
150
|
def groups(self):
|
109
151
|
return self._groups
|
@@ -122,13 +164,26 @@ class AgentSimulation:
|
|
122
164
|
agents: list[Agent],
|
123
165
|
config: dict,
|
124
166
|
exp_id: str,
|
167
|
+
exp_name: str,
|
125
168
|
enable_avro: bool,
|
126
169
|
avro_path: Path,
|
170
|
+
enable_pgsql: bool,
|
171
|
+
pgsql_copy_writer: ray.ObjectRef,
|
172
|
+
mlflow_run_id: str = None, # type: ignore
|
127
173
|
logging_level: int = logging.WARNING,
|
128
174
|
):
|
129
175
|
"""创建远程组"""
|
130
176
|
group = AgentGroup.remote(
|
131
|
-
agents,
|
177
|
+
agents,
|
178
|
+
config,
|
179
|
+
exp_id,
|
180
|
+
exp_name,
|
181
|
+
enable_avro,
|
182
|
+
avro_path,
|
183
|
+
enable_pgsql,
|
184
|
+
pgsql_copy_writer,
|
185
|
+
mlflow_run_id,
|
186
|
+
logging_level,
|
132
187
|
)
|
133
188
|
return group_name, group, agents
|
134
189
|
|
@@ -174,7 +229,6 @@ class AgentSimulation:
|
|
174
229
|
memory_config_func.append(self.default_memory_config_institution)
|
175
230
|
else:
|
176
231
|
memory_config_func.append(self.default_memory_config_citizen)
|
177
|
-
|
178
232
|
# 使用线程池并行创建 AgentGroup
|
179
233
|
group_creation_params = []
|
180
234
|
class_init_index = 0
|
@@ -218,6 +272,16 @@ class AgentSimulation:
|
|
218
272
|
|
219
273
|
class_init_index += agent_count_i
|
220
274
|
|
275
|
+
# 初始化mlflow连接
|
276
|
+
_mlflow_config = self.config.get("metric_request", {}).get("mlflow")
|
277
|
+
if _mlflow_config:
|
278
|
+
mlflow_run_id, _ = init_mlflow_connection(
|
279
|
+
config=_mlflow_config,
|
280
|
+
mlflow_run_name=f"EXP_{self.exp_name}_{1000*int(time.time())}",
|
281
|
+
experiment_name=self.exp_name,
|
282
|
+
)
|
283
|
+
else:
|
284
|
+
mlflow_run_id = None
|
221
285
|
# 收集所有创建组的参数
|
222
286
|
creation_tasks = []
|
223
287
|
for group_name, agents in group_creation_params:
|
@@ -226,8 +290,14 @@ class AgentSimulation:
|
|
226
290
|
agents,
|
227
291
|
self.config,
|
228
292
|
self.exp_id,
|
229
|
-
self.
|
230
|
-
self.
|
293
|
+
self.exp_name,
|
294
|
+
self.enable_avro,
|
295
|
+
self.avro_path,
|
296
|
+
self.enable_pgsql,
|
297
|
+
# TODO:
|
298
|
+
# self._pgsql_copy_writer, # type:ignore
|
299
|
+
None,
|
300
|
+
mlflow_run_id,
|
231
301
|
self.logging_level,
|
232
302
|
)
|
233
303
|
creation_tasks.append((group_name, group, agents))
|
@@ -393,7 +463,7 @@ class AgentSimulation:
|
|
393
463
|
return EXTRA_ATTRIBUTES, PROFILE, BASE
|
394
464
|
|
395
465
|
async def send_survey(
|
396
|
-
self, survey: Survey, agent_uuids: Optional[
|
466
|
+
self, survey: Survey, agent_uuids: Optional[list[uuid.UUID]] = None
|
397
467
|
):
|
398
468
|
"""发送问卷"""
|
399
469
|
survey_dict = survey.to_dict()
|
@@ -410,7 +480,7 @@ class AgentSimulation:
|
|
410
480
|
await self._messager.send_message(topic, payload)
|
411
481
|
|
412
482
|
async def send_interview_message(
|
413
|
-
self, content: str, agent_uuids: Union[uuid.UUID,
|
483
|
+
self, content: str, agent_uuids: Union[uuid.UUID, list[uuid.UUID]]
|
414
484
|
):
|
415
485
|
"""发送面试消息"""
|
416
486
|
payload = {
|
@@ -438,10 +508,17 @@ class AgentSimulation:
|
|
438
508
|
async def _save_exp_info(self) -> None:
|
439
509
|
"""异步保存实验信息到YAML文件"""
|
440
510
|
try:
|
441
|
-
|
442
|
-
|
511
|
+
if self.enable_avro:
|
512
|
+
with open(self._exp_info_file, "w") as f:
|
513
|
+
yaml.dump(self._exp_info, f)
|
443
514
|
except Exception as e:
|
444
|
-
logger.error(f"保存实验信息失败: {str(e)}")
|
515
|
+
logger.error(f"Avro保存实验信息失败: {str(e)}")
|
516
|
+
try:
|
517
|
+
if self.enable_pgsql:
|
518
|
+
# TODO
|
519
|
+
pass
|
520
|
+
except Exception as e:
|
521
|
+
logger.error(f"PostgreSQL保存实验信息失败: {str(e)}")
|
445
522
|
|
446
523
|
async def _update_exp_status(self, status: int, error: str = "") -> None:
|
447
524
|
"""更新实验状态并保存"""
|
@@ -492,7 +569,6 @@ class AgentSimulation:
|
|
492
569
|
tasks = []
|
493
570
|
for group in self._groups.values():
|
494
571
|
tasks.append(group.run.remote())
|
495
|
-
|
496
572
|
# 等待所有group运行完成
|
497
573
|
await asyncio.gather(*tasks)
|
498
574
|
|
pycityagent/workflow/__init__.py
CHANGED
@@ -4,14 +4,16 @@
|
|
4
4
|
This module contains classes for creating blocks and running workflows.
|
5
5
|
"""
|
6
6
|
|
7
|
-
from .block import Block, log_and_check, log_and_check_with_memory,
|
7
|
+
from .block import (Block, log_and_check, log_and_check_with_memory,
|
8
|
+
trigger_class)
|
8
9
|
from .prompt import FormatPrompt
|
9
|
-
from .tool import GetMap, SencePOI, Tool
|
10
|
-
from .trigger import MemoryChangeTrigger, TimeTrigger
|
10
|
+
from .tool import ExportMlflowMetrics, GetMap, SencePOI, Tool
|
11
|
+
from .trigger import EventTrigger, MemoryChangeTrigger, TimeTrigger
|
11
12
|
|
12
13
|
__all__ = [
|
13
14
|
"SencePOI",
|
14
15
|
"Tool",
|
16
|
+
"ExportMlflowMetrics",
|
15
17
|
"GetMap",
|
16
18
|
"MemoryChangeTrigger",
|
17
19
|
"TimeTrigger",
|
pycityagent/workflow/block.py
CHANGED
@@ -3,12 +3,11 @@ import functools
|
|
3
3
|
import inspect
|
4
4
|
from typing import Any, Callable, Coroutine, Optional, Union
|
5
5
|
|
6
|
-
from
|
7
|
-
from pycityagent.workflow.trigger import EventTrigger
|
8
|
-
|
6
|
+
from ..environment.simulator import Simulator
|
9
7
|
from ..llm import LLM
|
10
8
|
from ..memory import Memory
|
11
9
|
from ..utils.decorators import record_call_aio
|
10
|
+
from ..workflow.trigger import EventTrigger
|
12
11
|
|
13
12
|
TRIGGER_INTERVAL = 1
|
14
13
|
|
pycityagent/workflow/prompt.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import
|
1
|
+
from typing import Optional, Union
|
2
2
|
import re
|
3
3
|
|
4
4
|
|
@@ -10,7 +10,7 @@ class FormatPrompt:
|
|
10
10
|
Attributes:
|
11
11
|
template (str): The template string containing placeholders.
|
12
12
|
system_prompt (Optional[str]): An optional system prompt to add to the dialog.
|
13
|
-
variables (
|
13
|
+
variables (list[str]): A list of variable names extracted from the template.
|
14
14
|
formatted_string (str): The formatted string derived from the template and provided variables.
|
15
15
|
"""
|
16
16
|
|
@@ -27,12 +27,12 @@ class FormatPrompt:
|
|
27
27
|
self.variables = self._extract_variables()
|
28
28
|
self.formatted_string = "" # To store the formatted string
|
29
29
|
|
30
|
-
def _extract_variables(self) ->
|
30
|
+
def _extract_variables(self) -> list[str]:
|
31
31
|
"""
|
32
32
|
Extracts variable names from the template string.
|
33
33
|
|
34
34
|
Returns:
|
35
|
-
|
35
|
+
list[str]: A list of variable names found within the template.
|
36
36
|
"""
|
37
37
|
return re.findall(r"\{(\w+)\}", self.template)
|
38
38
|
|
@@ -51,12 +51,12 @@ class FormatPrompt:
|
|
51
51
|
) # Store the formatted string
|
52
52
|
return self.formatted_string
|
53
53
|
|
54
|
-
def to_dialog(self) ->
|
54
|
+
def to_dialog(self) -> list[dict[str, str]]:
|
55
55
|
"""
|
56
56
|
Converts the formatted prompt and optional system prompt into a dialog format.
|
57
57
|
|
58
58
|
Returns:
|
59
|
-
|
59
|
+
list[dict[str, str]]: A list representing the dialog with roles and content.
|
60
60
|
"""
|
61
61
|
dialog = []
|
62
62
|
if self.system_prompt:
|
pycityagent/workflow/tool.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
|
1
|
+
import time
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
from collections.abc import Callable
|
4
|
+
from mlflow.entities import Metric
|
2
5
|
|
3
6
|
from ..agent import Agent
|
4
|
-
from ..environment import LEVEL_ONE_PRE, POI_TYPE_DICT, AoiService,
|
7
|
+
from ..environment import (LEVEL_ONE_PRE, POI_TYPE_DICT, AoiService,
|
8
|
+
PersonService)
|
5
9
|
from ..workflow import Block
|
6
10
|
|
7
11
|
|
@@ -72,7 +76,7 @@ class SencePOI(Tool):
|
|
72
76
|
Attributes:
|
73
77
|
radius (int): The radius within which to search for POIs.
|
74
78
|
category_prefix (str): The prefix for the categories of POIs to consider.
|
75
|
-
variables (
|
79
|
+
variables (list[str]): A list of variables relevant to the tool's operation.
|
76
80
|
|
77
81
|
Args:
|
78
82
|
radius (int, optional): The circular search radius. Defaults to 100.
|
@@ -139,7 +143,7 @@ class UpdateWithSimulator(Tool):
|
|
139
143
|
if agent._simulator is None:
|
140
144
|
return
|
141
145
|
if not agent._has_bound_to_simulator:
|
142
|
-
await agent._bind_to_simulator()
|
146
|
+
await agent._bind_to_simulator() # type: ignore
|
143
147
|
simulator = agent.simulator
|
144
148
|
memory = agent.memory
|
145
149
|
person_id = await memory.get("id")
|
@@ -181,3 +185,48 @@ class ResetAgentPosition(Tool):
|
|
181
185
|
lane_id=lane_id,
|
182
186
|
s=s,
|
183
187
|
)
|
188
|
+
|
189
|
+
|
190
|
+
class ExportMlflowMetrics(Tool):
|
191
|
+
def __init__(self, log_batch_size: int = 100) -> None:
|
192
|
+
self._log_batch_size = log_batch_size
|
193
|
+
# TODO:support other log types
|
194
|
+
self.metric_log_cache: list[Metric] = []
|
195
|
+
|
196
|
+
async def __call__(
|
197
|
+
self,
|
198
|
+
metric: Union[Metric, dict],
|
199
|
+
clear_cache: bool = False,
|
200
|
+
):
|
201
|
+
agent = self.agent
|
202
|
+
batch_size = self._log_batch_size
|
203
|
+
if len(self.metric_log_cache) > batch_size:
|
204
|
+
client = agent.mlflow_client
|
205
|
+
await client.log_batch(
|
206
|
+
metrics=self.metric_log_cache[:batch_size],
|
207
|
+
)
|
208
|
+
self.metric_log_cache = self.metric_log_cache[batch_size:]
|
209
|
+
else:
|
210
|
+
if isinstance(metric, Metric):
|
211
|
+
self.metric_log_cache.append(metric)
|
212
|
+
else:
|
213
|
+
_metric = Metric(
|
214
|
+
key=metric["key"],
|
215
|
+
value=metric["value"],
|
216
|
+
timestamp=metric.get("timestamp", int(1000 * time.time())),
|
217
|
+
step=metric["step"],
|
218
|
+
)
|
219
|
+
self.metric_log_cache.append(_metric)
|
220
|
+
if clear_cache:
|
221
|
+
await self._clear_cache()
|
222
|
+
|
223
|
+
async def _clear_cache(
|
224
|
+
self,
|
225
|
+
):
|
226
|
+
agent = self.agent
|
227
|
+
client = agent.mlflow_client
|
228
|
+
if len(self.metric_log_cache) > 0:
|
229
|
+
await client.log_batch(
|
230
|
+
metrics=self.metric_log_cache,
|
231
|
+
)
|
232
|
+
self.metric_log_cache = []
|
pycityagent/workflow/trigger.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import asyncio
|
2
|
-
from typing import
|
2
|
+
from typing import Optional
|
3
3
|
import socket
|
4
4
|
from ..memory import Memory
|
5
5
|
from ..environment import Simulator
|
@@ -11,7 +11,7 @@ class EventTrigger:
|
|
11
11
|
"""Base class for event triggers that wait for specific conditions to be met."""
|
12
12
|
|
13
13
|
# 定义该trigger需要的组件类型
|
14
|
-
required_components:
|
14
|
+
required_components: list[type] = []
|
15
15
|
|
16
16
|
def __init__(self, block=None):
|
17
17
|
self.block = block
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pycityagent
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0a20
|
4
4
|
Summary: LLM-based城市环境agent构建库
|
5
5
|
License: MIT
|
6
6
|
Author: Yuwei Yan
|
@@ -26,6 +26,7 @@ Requires-Dist: gradio (>=5.7.1,<6.0.0)
|
|
26
26
|
Requires-Dist: grpcio (==1.67.1)
|
27
27
|
Requires-Dist: langchain-core (>=0.3.28,<0.4.0)
|
28
28
|
Requires-Dist: matplotlib (==3.8.3)
|
29
|
+
Requires-Dist: mlflow (>=2.19.0,<3.0.0)
|
29
30
|
Requires-Dist: mosstool (==1.0.24)
|
30
31
|
Requires-Dist: networkx (==3.2.1)
|
31
32
|
Requires-Dist: numpy (>=1.20.0,<2.0.0)
|
@@ -33,8 +34,9 @@ Requires-Dist: openai (>=1.58.1,<2.0.0)
|
|
33
34
|
Requires-Dist: pandavro (>=1.8.0,<2.0.0)
|
34
35
|
Requires-Dist: poetry (>=1.2.2)
|
35
36
|
Requires-Dist: protobuf (<=4.24.0)
|
37
|
+
Requires-Dist: psycopg[binary] (>=3.2.3,<4.0.0)
|
36
38
|
Requires-Dist: pycitydata (==1.0.0)
|
37
|
-
Requires-Dist: pycityproto (>=2.1.
|
39
|
+
Requires-Dist: pycityproto (>=2.1.5,<3.0.0)
|
38
40
|
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
39
41
|
Requires-Dist: ray (>=2.40.0,<3.0.0)
|
40
42
|
Requires-Dist: sidecar (==0.7.0)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
pycityagent/__init__.py,sha256=EDxt3Su3lH1IMh9suNw7GeGL7UrXeWiZTw5KWNznDzc,637
|
2
|
-
pycityagent/agent.py,sha256=
|
2
|
+
pycityagent/agent.py,sha256=HRFAG_iM1q3nvXtV0T-Dz01foOtty4IWka7h4WD97CU,24268
|
3
3
|
pycityagent/economy/__init__.py,sha256=aonY4WHnx-6EGJ4WKrx4S-2jAkYNLtqUA04jp6q8B7w,75
|
4
|
-
pycityagent/economy/econ_client.py,sha256=
|
4
|
+
pycityagent/economy/econ_client.py,sha256=GuHK9ZBnhqW3Z7F8ViDJn_iN73yOBbbwFyJv1wLEBDk,12211
|
5
5
|
pycityagent/environment/__init__.py,sha256=awHxlOud-btWbk0FCS4RmGJ13W84oVCkbGfcrhKqihA,240
|
6
6
|
pycityagent/environment/interact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
pycityagent/environment/interact/interact.py,sha256=ifxPPzuHeqLHIZ_6zvfXMoBOnBsXNIP4bYp7OJ7pnEQ,6588
|
@@ -21,23 +21,23 @@ 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=XjcxbyBIbB3Ht9z087z_oWIPAN6pP5Eq1lyf4W5atb8,12502
|
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
|
28
|
-
pycityagent/environment/utils/geojson.py,sha256=
|
28
|
+
pycityagent/environment/utils/geojson.py,sha256=LVHAdEhnZM8d0BoUnuPiIL_gaeXBIIglrLrfje5M0b4,661
|
29
29
|
pycityagent/environment/utils/grpc.py,sha256=6EJwKXXktIWb1NcUiJzIRmfrY0S03QAXXGcCDHqAT00,1998
|
30
|
-
pycityagent/environment/utils/map_utils.py,sha256=
|
30
|
+
pycityagent/environment/utils/map_utils.py,sha256=lYOEoCFFK6-e9N5txLMMq4HUlxMqc8Uw1YrGW5oJmgg,5749
|
31
31
|
pycityagent/environment/utils/port.py,sha256=3OM6kSUt3PxvDUOlgyiendBtETaWU8Mzk_8H0TzTmYg,295
|
32
32
|
pycityagent/environment/utils/protobuf.py,sha256=0jBvK_s96y_n7tuMbG22TOtQmg71SGV4ONDy2IGsU9o,1148
|
33
33
|
pycityagent/llm/__init__.py,sha256=7klKEmCcDWJIu-F4DoAukSuKfDbLhdczrSIhpwow-sY,145
|
34
|
-
pycityagent/llm/embedding.py,sha256=
|
35
|
-
pycityagent/llm/llm.py,sha256=
|
34
|
+
pycityagent/llm/embedding.py,sha256=2psX_EK67oPlYe77g43EYUYams4M9AiJqxpHTFHG0n8,4253
|
35
|
+
pycityagent/llm/llm.py,sha256=vJaaGqVuyV-GlBxrnvGKZnMDlxeTT_sGUTdxz5tYwEE,15141
|
36
36
|
pycityagent/llm/llmconfig.py,sha256=4Ylf4OFSBEFy8jrOneeX0HvPhWEaF5jGvy1HkXK08Ro,436
|
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=
|
40
|
+
pycityagent/memory/memory.py,sha256=vJxHOI74aJDGZPFu2LbBr02ASfOYpig66fto6Gjr-6Q,18191
|
41
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
|
@@ -45,9 +45,12 @@ pycityagent/memory/state.py,sha256=5W0c1yJ-aaPpE74B2LEcw3Ygpm77tyooHv8NylyrozE,5
|
|
45
45
|
pycityagent/memory/utils.py,sha256=wLNlNlZ-AY9VB8kbUIy0UQSYh26FOQABbhmKQkit5o8,850
|
46
46
|
pycityagent/message/__init__.py,sha256=TCjazxqb5DVwbTu1fF0sNvaH_EPXVuj2XQ0p6W-QCLU,55
|
47
47
|
pycityagent/message/messager.py,sha256=W_OVlNGcreHSBf6v-DrEnfNCXExB78ySr0w26MSncfU,2541
|
48
|
+
pycityagent/metrics/__init__.py,sha256=X08PaBbGVAd7_PRGLREXWxaqm7nS82WBQpD1zvQzcqc,128
|
49
|
+
pycityagent/metrics/mlflow_client.py,sha256=g_tHxWkWTDijtbGL74-HmiYzWVKb1y8-w12QrY9jL30,4449
|
50
|
+
pycityagent/metrics/utils/const.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
51
|
pycityagent/simulation/__init__.py,sha256=jYaqaNpzM5M_e_ykISS_M-mIyYdzJXJWhgpfBpA6l5k,111
|
49
|
-
pycityagent/simulation/agentgroup.py,sha256=
|
50
|
-
pycityagent/simulation/simulation.py,sha256=
|
52
|
+
pycityagent/simulation/agentgroup.py,sha256=6p8-OP2x_syaQ1pWLgll0LHs823OHnappuY-8XzL_LU,13383
|
53
|
+
pycityagent/simulation/simulation.py,sha256=pxFdaNMLdJMcpW8gnOcxjfbz4gkpcvWsTR0rNP8rE9k,21675
|
51
54
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
52
55
|
pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
|
53
56
|
pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
|
@@ -57,13 +60,13 @@ pycityagent/utils/decorators.py,sha256=Gk3r41hfk6awui40tbwpq3C7wC7jHaRmLRlcJFlLQ
|
|
57
60
|
pycityagent/utils/parsers/__init__.py,sha256=AN2xgiPxszWK4rpX7zrqRsqNwfGF3WnCA5-PFTvbaKk,281
|
58
61
|
pycityagent/utils/parsers/code_block_parser.py,sha256=Cs2Z_hm9VfNCpPPll1TwteaJF-HAQPs-3RApsOekFm4,1173
|
59
62
|
pycityagent/utils/parsers/json_parser.py,sha256=FZ3XN1g8z4Dr2TFraUOoah1oQcze4fPd2m01hHoX0Mo,2917
|
60
|
-
pycityagent/utils/parsers/parser_base.py,sha256=
|
63
|
+
pycityagent/utils/parsers/parser_base.py,sha256=KBKO4zLZPNdGjPAGqIus8LseZ8W3Tlt2y0QxqeCd25Q,1713
|
61
64
|
pycityagent/utils/survey_util.py,sha256=Be9nptmu2JtesFNemPgORh_2GsN7rcDYGQS9Zfvc5OI,2169
|
62
|
-
pycityagent/workflow/__init__.py,sha256=
|
63
|
-
pycityagent/workflow/block.py,sha256=
|
64
|
-
pycityagent/workflow/prompt.py,sha256=
|
65
|
-
pycityagent/workflow/tool.py,sha256=
|
66
|
-
pycityagent/workflow/trigger.py,sha256=
|
67
|
-
pycityagent-2.0.
|
68
|
-
pycityagent-2.0.
|
69
|
-
pycityagent-2.0.
|
65
|
+
pycityagent/workflow/__init__.py,sha256=QNkUV-9mACMrR8c0cSKna2gC1mMZdxXbxWzjE-Uods0,621
|
66
|
+
pycityagent/workflow/block.py,sha256=WkE2On97DCZS_9n8aIgT8wxv9Oaff4Fdf2tLqbKfMtE,6010
|
67
|
+
pycityagent/workflow/prompt.py,sha256=6jI0Rq54JLv3-IXqZLYug62vse10wTI83xvf4ZX42nk,2929
|
68
|
+
pycityagent/workflow/tool.py,sha256=SGY18lT71hBLKagopirFbxRjPY_387Dobo9SUwjHIn0,8215
|
69
|
+
pycityagent/workflow/trigger.py,sha256=Df-MOBEDWBbM-v0dFLQLXteLsipymT4n8vqexmK2GiQ,5643
|
70
|
+
pycityagent-2.0.0a20.dist-info/METADATA,sha256=aygfImVFM4jG0nXVuunu5LZDNi4JyikBULFce0WGWeM,7848
|
71
|
+
pycityagent-2.0.0a20.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
72
|
+
pycityagent-2.0.0a20.dist-info/RECORD,,
|
File without changes
|