Skip to content

Commit

Permalink
fix: arrange output parser classes (#59)
Browse files Browse the repository at this point in the history
* fix: arrange output parser classes

Put all the output parser classes in one place.
Remove redundant output parser classes.
Reuse output parser classes with the same functionality.

* fix: arrange output parser classes

Put all the output parser classes in one place.
Remove redundant output parser classes.
Reuse output parser classes with the same functionality.

* fix: output parser error

* fix: output parser error

---------

Co-authored-by: chenweize1998 <[email protected]>
  • Loading branch information
minleminzui and chenweize1998 authored Oct 11, 2023
1 parent 0208699 commit 88744f1
Show file tree
Hide file tree
Showing 38 changed files with 646 additions and 1,323 deletions.
5 changes: 1 addition & 4 deletions agentverse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from .tasks import *


# from .agents import Agent
from .output_parser import output_parser_registry
from .environments import env_registry
from .environments.simulation_env.rules.order import order_registry
from .environments.simulation_env.rules.describer import describer_registry
Expand Down
2 changes: 1 addition & 1 deletion agentverse/agents/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from agentverse.llms import BaseLLM
from agentverse.memory import BaseMemory, ChatHistoryMemory
from agentverse.message import Message
from agentverse.parser import OutputParser
from agentverse.output_parser import OutputParser
from agentverse.memory_manipulator import BaseMemoryManipulator


Expand Down
2 changes: 1 addition & 1 deletion agentverse/agents/simulation_agent/reflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from agentverse.llms import BaseLLM
from agentverse.memory import BaseMemory, ChatHistoryMemory
from agentverse.message import Message
from agentverse.parser import OutputParser
from agentverse.output_parser import OutputParser

from agentverse.message import Message
from agentverse.agents.base import BaseAgent
Expand Down
2 changes: 1 addition & 1 deletion agentverse/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from agentverse.memory import memory_registry
from agentverse.memory_manipulator import memory_manipulator_registry

from agentverse.parser import output_parser_registry
from agentverse.output_parser import output_parser_registry

if TYPE_CHECKING:
from agentverse.agents import BaseAgent
Expand Down
5 changes: 5 additions & 0 deletions agentverse/output_parser/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from agentverse.registry import Registry

output_parser_registry = Registry(name="OutputParserRegistry")

from .output_parser import *
Loading

0 comments on commit 88744f1

Please sign in to comment.