Skip to content

Commit

Permalink
update to 2.0.0a51
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchenplus committed Jan 8, 2025
1 parent dfb9b0e commit 3048a39
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/city_simulator/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pycityagent.environment.simulator import Simulator
from pycityagent.llm import LLM
from pycityagent.memory.memory import Memory
from pycityagent.workflow.tool import ResetAgentPosition, UpdateWithSimulator
from pycityagent.tools import ResetAgentPosition, UpdateWithSimulator
from pycityproto.city.person.v2 import person_pb2 as person_pb2

logging.basicConfig(
Expand Down
2 changes: 1 addition & 1 deletion examples/cityagent/blocks/cognition_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class CognitionBlock(Block):
def __init__(self, llm: LLM, memory: Memory):
super().__init__("CognitionBlock", llm)
self.memory = memory
self.set_memory(memory)

async def forward(self):
print(f"执行认知更新")
2 changes: 1 addition & 1 deletion examples/cityagent/blocks/mobility_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import numpy as np

from pycityagent.workflow.prompt import FormatPrompt
from pycityagent.workflow.tool import GetMap
from pycityagent.tools import GetMap

PLACE_TYPE_SELECTION_PROMPT = """
作为一个智能决策系统,请从用户输入的需求中判断其需要前往的地点类型。
Expand Down
2 changes: 1 addition & 1 deletion examples/cityagent/cityagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pycityagent import CitizenAgent, Simulator
from pycityagent.llm.llm import LLM
from pycityagent.memory import Memory
from pycityagent.workflow.tool import ResetAgentPosition, UpdateWithSimulator
from pycityagent.tools import ResetAgentPosition, UpdateWithSimulator


class MyAgent(CitizenAgent):
Expand Down
2 changes: 1 addition & 1 deletion pycityagent/cityagent/nbsagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pycityagent.llm.llm import LLM
from pycityagent.memory import Memory
from pycityagent.message import Messager
from pycityagent.workflow.tool import ExportMlflowMetrics
from pycityagent.tools import ExportMlflowMetrics

logger = logging.getLogger("pycityagent")

Expand Down
2 changes: 1 addition & 1 deletion pycityagent/cityagent/societyagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pycityagent.memory import Memory
from pycityagent.message import Messager
from pycityagent.workflow import Block
from pycityagent.workflow.tool import UpdateWithSimulator
from pycityagent.tools import UpdateWithSimulator

from .blocks import (CognitionBlock, EconomyBlock, MobilityBlock, NeedsBlock,
OtherBlock, PlanBlock, SocialBlock)
Expand Down
4 changes: 3 additions & 1 deletion pycityagent/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from .tool import ExportMlflowMetrics, GetMap, SencePOI, Tool, UpdateWithSimulator
from .tool import (ExportMlflowMetrics, GetMap, ResetAgentPosition, SencePOI,
Tool, UpdateWithSimulator)

__all__ = [
"SencePOI",
"Tool",
"ExportMlflowMetrics",
"GetMap",
"UpdateWithSimulator",
"ResetAgentPosition",
]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pycityagent"
version = "2.0.0a50" # change it for each release
version = "2.0.0a51" # change it for each release
description = "LLM-based city environment agent building library"
authors = [
{ name = "Yuwei Yan", email = "[email protected]" },
Expand Down

0 comments on commit 3048a39

Please sign in to comment.