From 0360286d5125c01c551e9eb9b2076500d150aab0 Mon Sep 17 00:00:00 2001 From: chenweize1998 Date: Tue, 10 Oct 2023 09:39:36 +0800 Subject: [PATCH] fix: fix the incompatible simulation configs. ci skip --- .../simulation_agent/prisoner_dilemma.py | 4 ++-- .../tasks/simulation/alice_home/config.yaml | 4 ++++ .../tasks/simulation/db_diag/config.yaml | 6 ++++++ .../math_problem_2players_tools/config.yaml | 4 ++++ .../nlp_classroom_3players/config.yaml | 7 +++++++ .../config.yaml | 6 ++++++ .../nlp_classroom_9players/config.yaml | 18 ++++++++++++++++++ .../nlp_classroom_9players_group/config.yaml | 18 ++++++++++++++++++ .../tasks/simulation/pokemon/config.yaml | 12 ++++++++++++ .../simulation/prisoner_dilemma/config.yaml | 6 ++++++ .../sde_team_2players/partial_config.yaml | 8 +++++++- .../sde_team/sde_team_3players/config.yaml | 5 ++++- 12 files changed, 94 insertions(+), 4 deletions(-) diff --git a/agentverse/agents/simulation_agent/prisoner_dilemma.py b/agentverse/agents/simulation_agent/prisoner_dilemma.py index eb4390ecb..bf257c168 100644 --- a/agentverse/agents/simulation_agent/prisoner_dilemma.py +++ b/agentverse/agents/simulation_agent/prisoner_dilemma.py @@ -6,8 +6,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 diff --git a/agentverse/tasks/simulation/alice_home/config.yaml b/agentverse/tasks/simulation/alice_home/config.yaml index afec6e036..1c79377da 100644 --- a/agentverse/tasks/simulation/alice_home/config.yaml +++ b/agentverse/tasks/simulation/alice_home/config.yaml @@ -84,6 +84,8 @@ agents: llm_type: gpt-4 temperature: 0.3 max_tokens: 128 + output_parser: + type: alice_home current_time: "2023-04-01 07:00:00" - agent_type: reflection @@ -120,6 +122,8 @@ agents: llm_type: gpt-4 temperature: 0.3 max_tokens: 128 + output_parser: + type: alice_home current_time: "2023-04-01 07:00:00" tools: ~ \ No newline at end of file diff --git a/agentverse/tasks/simulation/db_diag/config.yaml b/agentverse/tasks/simulation/db_diag/config.yaml index 1e4e055f7..f89d8cd19 100644 --- a/agentverse/tasks/simulation/db_diag/config.yaml +++ b/agentverse/tasks/simulation/db_diag/config.yaml @@ -211,6 +211,8 @@ agents: model: gpt-4 temperature: 0.7 max_tokens: 1024 + output_parser: + type: db_diag tools: *tools verbose: true - @@ -233,6 +235,8 @@ agents: model: gpt-4 temperature: 0.7 max_tokens: 512 + output_parser: + type: db_diag tools: *tools verbose: true - @@ -255,5 +259,7 @@ agents: model: gpt-4 temperature: 0.7 max_tokens: 512 + output_parser: + type: db_diag tools: *tools verbose: true \ No newline at end of file diff --git a/agentverse/tasks/simulation/math_problem_2players_tools/config.yaml b/agentverse/tasks/simulation/math_problem_2players_tools/config.yaml index 2a345b54b..1599d8356 100644 --- a/agentverse/tasks/simulation/math_problem_2players_tools/config.yaml +++ b/agentverse/tasks/simulation/math_problem_2players_tools/config.yaml @@ -98,6 +98,8 @@ agents: model: text-davinci-003 temperature: 0.7 max_tokens: 250 + output_parser: + type: math_problem_2players_tools tools: *tools - agent_type: tool @@ -112,4 +114,6 @@ agents: model: text-davinci-003 temperature: 0.7 max_tokens: 250 + output_parser: + type: math_problem_2players_tools tools: *tools diff --git a/agentverse/tasks/simulation/nlp_classroom_3players/config.yaml b/agentverse/tasks/simulation/nlp_classroom_3players/config.yaml index 41fa1cb8f..234891698 100644 --- a/agentverse/tasks/simulation/nlp_classroom_3players/config.yaml +++ b/agentverse/tasks/simulation/nlp_classroom_3players/config.yaml @@ -40,6 +40,8 @@ agents: model: 'gpt-4' temperature: 0.7 max_tokens: 250 + output_parser: + type: nlp_classroom_3players - agent_type: conversation name: Student Beta role_description: You are Beta, a student curious about Natural Language Processing and you want to learn some basic concepts of NLP. You know nothing about the area so you will ask lots of questions. @@ -51,6 +53,8 @@ agents: model: 'gpt-4' temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_3players - agent_type: conversation name: Teaching Assistant Gamma role_description: You are Gamma, a teaching assistant of the Natural Language Processing module. You mostly help with logistics and marking, but occasionally handles questions. Your answer should be less than 100 words. @@ -62,5 +66,8 @@ agents: model: gpt-4 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_3players + tools: diff --git a/agentverse/tasks/simulation/nlp_classroom_3players_withtool/config.yaml b/agentverse/tasks/simulation/nlp_classroom_3players_withtool/config.yaml index be2e07084..336c7e25e 100644 --- a/agentverse/tasks/simulation/nlp_classroom_3players_withtool/config.yaml +++ b/agentverse/tasks/simulation/nlp_classroom_3players_withtool/config.yaml @@ -160,6 +160,8 @@ agents: model: text-davinci-003 temperature: 0.7 max_tokens: 250 + output_parser: + type: nlp_classroom_3players_withtool memory: memory_type: chat_history verbose: true @@ -182,6 +184,8 @@ agents: model: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_3players_withtool tools: *tools verbose: true - agent_type: tool @@ -203,5 +207,7 @@ agents: model: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_3players_withtool tools: *tools verbose: true diff --git a/agentverse/tasks/simulation/nlp_classroom_9players/config.yaml b/agentverse/tasks/simulation/nlp_classroom_9players/config.yaml index 6ec120a1d..2217a6223 100644 --- a/agentverse/tasks/simulation/nlp_classroom_9players/config.yaml +++ b/agentverse/tasks/simulation/nlp_classroom_9players/config.yaml @@ -99,6 +99,8 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 250 + output_parser: + type: nlp_classroom_9players memory: memory_type: chat_history - @@ -113,6 +115,8 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players - agent_type: conversation name: Student Amelia @@ -125,6 +129,8 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players - agent_type: conversation name: Student Ethan @@ -137,6 +143,8 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players - agent_type: conversation name: Student Charlotte @@ -149,6 +157,8 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players - agent_type: conversation name: Student Mason @@ -161,6 +171,8 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players - agent_type: conversation name: Student Ava @@ -173,6 +185,8 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players - agent_type: conversation name: Student Noah @@ -185,6 +199,8 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players - agent_type: conversation name: Student Emma @@ -197,5 +213,7 @@ agents: model: "gpt-4" temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players tools: diff --git a/agentverse/tasks/simulation/nlp_classroom_9players_group/config.yaml b/agentverse/tasks/simulation/nlp_classroom_9players_group/config.yaml index 42221521e..b8d9d0319 100644 --- a/agentverse/tasks/simulation/nlp_classroom_9players_group/config.yaml +++ b/agentverse/tasks/simulation/nlp_classroom_9players_group/config.yaml @@ -118,6 +118,8 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 250 + output_parser: + type: nlp_classroom_9players_group memory: memory_type: chat_history - @@ -131,6 +133,8 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players_group - agent_type: conversation name: Student Amelia @@ -142,6 +146,8 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players_group - agent_type: conversation name: Student Ethan @@ -153,6 +159,8 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players_group - agent_type: conversation name: Student Charlotte @@ -164,6 +172,8 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players_group - agent_type: conversation name: Student Mason @@ -175,6 +185,8 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players_group - agent_type: conversation name: Student Ava @@ -186,6 +198,8 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players_group - agent_type: conversation name: Student Noah @@ -197,6 +211,8 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players_group - agent_type: conversation name: Student Emma @@ -208,5 +224,7 @@ agents: llm_type: text-davinci-003 temperature: 0.7 max_tokens: 100 + output_parser: + type: nlp_classroom_9players_group tools: \ No newline at end of file diff --git a/agentverse/tasks/simulation/pokemon/config.yaml b/agentverse/tasks/simulation/pokemon/config.yaml index b032a501e..0a152de8d 100644 --- a/agentverse/tasks/simulation/pokemon/config.yaml +++ b/agentverse/tasks/simulation/pokemon/config.yaml @@ -84,6 +84,8 @@ agents: memory: memory_type: chat_history prompt_template: *prompt + output_parser: + type: pokemon llm: llm_type: gpt-3.5-turbo model: 'gpt-3.5-turbo' @@ -102,6 +104,8 @@ agents: memory: memory_type: chat_history prompt_template: *prompt + output_parser: + type: pokemon llm: llm_type: gpt-3.5-turbo model: gpt-3.5-turbo @@ -120,6 +124,8 @@ agents: memory: memory_type: chat_history prompt_template: *prompt + output_parser: + type: pokemon llm: llm_type: gpt-3.5-turbo model: gpt-3.5-turbo @@ -138,6 +144,8 @@ agents: memory: memory_type: chat_history prompt_template: *prompt + output_parser: + type: pokemon llm: llm_type: gpt-3.5-turbo model: gpt-3.5-turbo @@ -156,6 +164,8 @@ agents: memory: memory_type: chat_history prompt_template: *prompt + output_parser: + type: pokemon llm: llm_type: gpt-3.5-turbo model: gpt-3.5-turbo @@ -174,6 +184,8 @@ agents: memory: memory_type: chat_history prompt_template: *prompt + output_parser: + type: pokemon llm: llm_type: gpt-3.5-turbo model: gpt-3.5-turbo diff --git a/agentverse/tasks/simulation/prisoner_dilemma/config.yaml b/agentverse/tasks/simulation/prisoner_dilemma/config.yaml index 6b2b79005..dc03e4120 100644 --- a/agentverse/tasks/simulation/prisoner_dilemma/config.yaml +++ b/agentverse/tasks/simulation/prisoner_dilemma/config.yaml @@ -56,6 +56,8 @@ agents: llm_type: gpt-4 temperature: 1.2 max_tokens: 200 + output_parser: + type: prisoner_dilemma - agent_type: prisoner name: Suspect1 personality: "You are a Sophisticated Egoist, you always seek for your personal interests best" @@ -76,6 +78,8 @@ agents: llm_type: gpt-4 temperature: 1.2 max_tokens: 100 + output_parser: + type: prisoner_dilemma - agent_type: prisoner name: Suspect2 personality: "" @@ -96,5 +100,7 @@ agents: llm_type: gpt-4 temperature: 1.2 max_tokens: 100 + output_parser: + type: prisoner_dilemma tools: diff --git a/agentverse/tasks/simulation/sde_team/sde_team_2players/partial_config.yaml b/agentverse/tasks/simulation/sde_team/sde_team_2players/partial_config.yaml index e01f19312..881b0ef31 100644 --- a/agentverse/tasks/simulation/sde_team/sde_team_2players/partial_config.yaml +++ b/agentverse/tasks/simulation/sde_team/sde_team_2players/partial_config.yaml @@ -159,6 +159,8 @@ agents: llm_type: gpt-3.5-turbo temperature: 0. max_tokens: 1024 + output_parser: + type: sde_team/sde_team_2players - agent_type: conversation name: code_tester @@ -172,6 +174,8 @@ agents: llm_type: gpt-3.5-turbo temperature: 0. max_tokens: 256 + output_parser: + type: sde_team/sde_team_2players - agent_type: conversation name: code_reviewer @@ -184,4 +188,6 @@ agents: llm: llm_type: gpt-3.5-turbo temperature: 0. - max_tokens: 1024 \ No newline at end of file + max_tokens: 1024 + output_parser: + type: sde_team/sde_team_2players \ No newline at end of file diff --git a/agentverse/tasks/simulation/sde_team/sde_team_3players/config.yaml b/agentverse/tasks/simulation/sde_team/sde_team_3players/config.yaml index fe4ff4369..a4b0ef661 100644 --- a/agentverse/tasks/simulation/sde_team/sde_team_3players/config.yaml +++ b/agentverse/tasks/simulation/sde_team/sde_team_3players/config.yaml @@ -227,6 +227,7 @@ agents: llm_type: gpt-3.5-turbo temperature: 0.3 max_tokens: 1024 + output_parser: sde_team/sde_team_3players - agent_type: conversation name: code_reviewer @@ -240,6 +241,7 @@ agents: llm_type: gpt-3.5-turbo temperature: 0.3 max_tokens: 1024 + output_parser: sde_team/sde_team_3players - agent_type: conversation name: unit_test_generator @@ -249,4 +251,5 @@ agents: llm: llm_type: gpt-3.5-turbo temperature: 1.0 - max_tokens: 1024 \ No newline at end of file + max_tokens: 1024 + output_parser: sde_team/sde_team_3players \ No newline at end of file