Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull main into dev-v1 #82

Merged
merged 8 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

<!--
First of all, thank you for your contribution! 😄
-->


### 🤔 What is the nature of this change?

- [ ] New feature
- [ ] Fix bug / bug
- [ ] Style optimization
- [ ] Code style optimization
- [ ] Performance optimization
- [ ] Build optimization
- [ ] Website, documentation, demo improvements
- [ ] Refactor code or style
- [ ] Test related
- [ ] Solved proposed issues
- [ ] Other

### 🔗 Related Issue

(Describe the source of related requirements, such as the related issue discussion link. Example: close #123, close #456.)

### 💡 Background or solution

(The specific problem solved.)

### 📝 Changelog

(Describe changes from the user side, and list all potential break changes or other risks.)

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ AgentVerse is on a mission to revolutionize the multi-agent environment for larg


## How Can You Contribute?
- **Issue and Pull-Request**: If you encounter any problems when use AgentVerse, you can propose the issue. Beisdes, you can also autonomously ask us to assign issue to you and send the PR (Please follow the [PULL_REQUEST_TEMPLATE](https://github.com/OpenBMB/AgentVerse/blob/main/PULL_REQUEST_TEMPLATE.md)) after you solve it.

- **Code Development**: If you're an engineer, help us refine, optimize, and expand the current framework. We're always looking for talented developers to enhance our existing features and develop new modules.

- **Documentation and Tutorials**: If you have a knack for writing, help us improve our documentation, create tutorials, or write blog posts to make AgentVerse more accessible to the broader community.
Expand Down
1 change: 1 addition & 0 deletions agentverse/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .base import BaseAgent
from agentverse.agents.simulation_agent.conversation import ConversationAgent
from agentverse.agents.simulation_agent.tool import ToolAgent
from agentverse.agents.simulation_agent.reflection import ReflectionAgent
from agentverse.agents.simulation_agent.prisoner_dilemma import (
PoliceAgent,
PrisonerAgent,
Expand Down
6 changes: 3 additions & 3 deletions agentverse/agents/simulation_agent/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

from agentverse.message import Message

#from . import agent_registry
#from .base import BaseAgent
# from . import agent_registry
# from .base import BaseAgent
from agentverse.agents import agent_registry
from agentverse.agents.base import BaseAgent

Expand Down Expand Up @@ -66,7 +66,7 @@ async def astep(self, env_description: str = "") -> Message:
raise
except Exception as e:
logger.error(e)
logger.warning("Retrying...")
logger.warn("Retrying...")
continue

if parsed_response is None:
Expand Down
1 change: 1 addition & 0 deletions agentverse/environments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# from .basic import PipelineEnvironment
from .simulation_env.basic import BasicEnvironment
from .simulation_env.reflection import ReflectionEnvironment
from .simulation_env.pokemon import PokemonEnvironment
from .simulation_env.prisoner_dilemma import PrisonerDilemmaEnvironment
from .simulation_env.sde_team import SdeTeamEnvironment
Expand Down
9 changes: 5 additions & 4 deletions agentverse/environments/simulation_env/reflection.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import asyncio
import logging
from typing import Any, Dict, List

from datetime import datetime as dt
import datetime

from pydantic import Field

from agentverse.logging import logger
from agentverse.environments import env_registry as EnvironmentRegistry
from agentverse.agents.simulation_agent.conversation import BaseAgent

# from agentverse.environments.simulation_env.rules.base import Rule
from agentverse.environments.simulation_env.rules.base import SimulationRule as Rule
from agentverse.message import Message

from . import env_registry as EnvironmentRegistry
# from . import env_registry as EnvironmentRegistry
from ..base import BaseEnvironment

from pydantic import validator
Expand Down Expand Up @@ -70,7 +71,7 @@ def __init__(self, rule, **kwargs):
async def step(self) -> List[Message]:
"""Run one step of the environment"""

logging.log(logging.INFO, f"Tick tock. Current time: {self.current_time}")
logger.info(f"Tick tock. Current time: {self.current_time}")

# Get the next agent index
agent_ids = self.rule.get_next_agent_idx(self)
Expand Down Expand Up @@ -107,7 +108,7 @@ async def step(self) -> List[Message]:
def print_messages(self, messages: List[Message]) -> None:
for message in messages:
if message is not None:
logging.info(f"{message.sender}: {message.content}")
logger.info(f"{message.sender}: {message.content}")

def reset(self) -> None:
"""Reset the environment"""
Expand Down
Loading