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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from OpenBMB:main #8

Open
wants to merge 115 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
aa54608
feat: add azure openai
JetSquirrel Oct 7, 2023
6045f49
fix miss register
JetSquirrel Oct 8, 2023
e762c1e
Update README.md
chenweize1998 Oct 8, 2023
4f76ad6
Merge pull request #49 from JetSquirrel/azure_openai
chenweize1998 Oct 8, 2023
f717bc0
fix: openai llm default parameter and the missing import of bmtools #46
chenweize1998 Oct 8, 2023
62676a1
fix: critic agent initialization argument error
chenweize1998 Oct 8, 2023
ad67c70
ci: add a Github Actions workflow for smoke test
minleminzui Oct 8, 2023
e7acdd4
Merge pull request #50 from minleminzui/main
chenweize1998 Oct 8, 2023
5bbd355
report spend at the end of a task solving session
kierangilliam Oct 8, 2023
031d3d9
remove abstract requirement
kierangilliam Oct 8, 2023
f6d60c0
report metrics for simulations
kierangilliam Oct 8, 2023
abd444e
Merge pull request #52 from kierangilliam/report-usage
chenweize1998 Oct 9, 2023
bc58c02
update README.md
chenweize1998 Oct 9, 2023
d359c76
fix: allows users to customize config.yaml of the task (#53)
minleminzui Oct 9, 2023
ff67cff
ci skip. Update README.md
chenweize1998 Oct 9, 2023
0360286
fix: fix the incompatible simulation configs. ci skip
chenweize1998 Oct 10, 2023
8107ee4
Merge branch 'main' of github.com:OpenBMB/AgentVerse into main
chenweize1998 Oct 10, 2023
ccf4319
fix: complete the command line (#55)
minleminzui Oct 10, 2023
6bdce1d
refactor: reorganize script location
chenweize1998 Oct 10, 2023
6d42bb6
bump version to 0.1.5
chenweize1998 Oct 10, 2023
7954f21
ci skip. Update README.md
chenweize1998 Oct 10, 2023
7c8dbca
ci skip. Update README.md
chenweize1998 Oct 10, 2023
63b2d33
ci skip. Update README.md
chenweize1998 Oct 10, 2023
c4205bd
manually merge #19.
chenweize1998 Oct 10, 2023
9b03c91
fix: format error in some benchmark configs
chenweize1998 Oct 11, 2023
0208699
fix: update MANIFEST.in [ci skip]
chenweize1998 Oct 11, 2023
88744f1
fix: arrange output parser classes (#59)
minleminzui Oct 11, 2023
7739cba
bump version to 0.1.8 #60
chenweize1998 Oct 12, 2023
7aeed34
fix: fix a bug about updating kwargs
minleminzui Oct 13, 2023
3af33f8
Merge pull request #62 from OpenBMB/gyt_dev
minleminzui Oct 13, 2023
af34300
update
yushengsu-thu Oct 14, 2023
0a1a225
update
yushengsu-thu Oct 14, 2023
362dfce
update
yushengsu-thu Oct 14, 2023
86f10c3
update
yushengsu-thu Oct 14, 2023
1b2a86b
update
yushengsu-thu Oct 14, 2023
f1261cf
update
yushengsu-thu Oct 14, 2023
e477d7e
update
yushengsu-thu Oct 14, 2023
0b1ed5e
update
yushengsu-thu Oct 14, 2023
b529052
update
yushengsu-thu Oct 14, 2023
51f4c8b
update
yushengsu-thu Oct 14, 2023
bc9216e
update
yushengsu-thu Oct 14, 2023
dd49c21
update
yushengsu-thu Oct 14, 2023
558e8b2
update
yushengsu-thu Oct 14, 2023
7733c92
update
yushengsu-thu Oct 14, 2023
c853084
update
yushengsu-thu Oct 14, 2023
b0b018a
update
yushengsu-thu Oct 14, 2023
d13c412
update
yushengsu-thu Oct 14, 2023
af4b455
update
yushengsu-thu Oct 14, 2023
e72820a
update
yushengsu-thu Oct 14, 2023
5292621
add simulation ui params (#63)
JetSquirrel Oct 15, 2023
5b5f7fe
feat: agent order independence in config (#65)
1rubbishyuan Oct 16, 2023
519701e
update
yushengsu-thu Oct 16, 2023
7738f85
update
yushengsu-thu Oct 16, 2023
927955c
update
yushengsu-thu Oct 16, 2023
8a9a6b6
update
yushengsu-thu Oct 16, 2023
7209df3
update
yushengsu-thu Oct 16, 2023
d738273
Update README.md
yushengsu-thu Oct 16, 2023
fef985b
update
yushengsu-thu Oct 16, 2023
4bced67
update
yushengsu-thu Oct 16, 2023
eea1a8c
Merge pull request #66 from OpenBMB/56-to-do-update-the-readme
yushengsu-thu Oct 16, 2023
8a9f38e
Update README.md
yushengsu-thu Oct 16, 2023
31dc92d
Update README.md
yushengsu-thu Oct 16, 2023
6493304
doc: modify README.md (#67) [ci skip]
ASL-r Oct 17, 2023
b001a32
update requirements.txt [ci skip]
chenweize1998 Oct 18, 2023
53f2ec0
fix: session expired bug in tool calling
chenweize1998 Oct 18, 2023
39faec3
feat: support local llms (#68)
cheesewafer Oct 19, 2023
2b67776
Update README.md [ci skip]
chenweize1998 Oct 20, 2023
f50dbe9
Update README.md [ci skip]
chenweize1998 Oct 20, 2023
4451c41
Update README.md
yushengsu-thu Oct 21, 2023
03fdab7
Update README.md
yushengsu-thu Oct 22, 2023
d861178
Merge pull request #71 from OpenBMB/yushengsu-thu-patch-1
yushengsu-thu Oct 22, 2023
d108100
Update README.md [ci skip]
chenweize1998 Oct 22, 2023
f4718a5
Update README.md
yushengsu-thu Oct 22, 2023
7cabb5b
Merge pull request #74 from OpenBMB/yushengsu-thu-patch-1
yushengsu-thu Oct 22, 2023
193088a
Update README.md
yushengsu-thu Oct 22, 2023
dd4e651
fix: typo in logger call and error path in gui [ci skip]
chenweize1998 Oct 23, 2023
118c5fe
add PR template
yushengsu-thu Oct 23, 2023
970f344
Merge pull request #78 from OpenBMB/77-pull_request_templatemd
yushengsu-thu Oct 23, 2023
fb02336
Update README.md
yushengsu-thu Oct 23, 2023
eb6109b
Merge pull request #79 from OpenBMB/yushengsu-thu-patch-1
yushengsu-thu Oct 23, 2023
78387ee
Update README.md
yushengsu-thu Oct 23, 2023
dc0921b
Merge pull request #80 from OpenBMB/yushengsu-thu-patch-1
yushengsu-thu Oct 23, 2023
5fab7fc
fix: import error in alice home task #76
chenweize1998 Oct 23, 2023
0c1e7f2
Update README.md
yushengsu-thu Oct 25, 2023
0f82e26
Merge pull request #85 from OpenBMB/yushengsu-thu-patch-1
yushengsu-thu Oct 25, 2023
14a8f34
fix: bug in simulation gui. [ci skip]
chenweize1998 Oct 25, 2023
641290d
fix: bug in simulation gui.
chenweize1998 Oct 25, 2023
fab0ab8
Update agentverse.py
Kunlun-Zhu Oct 26, 2023
c9c0dbe
bump: 0.1.8.1
chenweize1998 Oct 27, 2023
64db306
feat: add tool support (#86)
minleminzui Oct 27, 2023
81a964c
doc: update readme on multi-agent tool using.
chenweize1998 Oct 27, 2023
f0ddd0e
Merge branch 'main' of github.com:OpenBMB/AgentVerse into main
chenweize1998 Oct 27, 2023
8ad97cb
doc: update installation and dependency
chenweize1998 Oct 30, 2023
067aae4
fix: remove debugging code. [ci skip]
chenweize1998 Oct 31, 2023
b0eeeea
fix: update outdated configs and fix logging #95
chenweize1998 Nov 7, 2023
42e5799
fix: some bugs in config file
chenweize1998 Nov 7, 2023
38cc573
feat: improve local model support and doc #96
chenweize1998 Nov 7, 2023
ddd9a88
doc: Update config.yaml typo [ci skip]
Divine-Shadow Nov 8, 2023
2e59ccb
doc: Fix typo in README.md (#90) [ci skip]
eltociear Nov 8, 2023
d882566
doc: update README.md (#92) [ci skip]
eltociear Nov 8, 2023
2557283
doc: update README.md [ci skip]
chenweize1998 Nov 10, 2023
abacf5a
fix: encoding for local llm. #100
chenweize1998 Nov 12, 2023
ffc3d39
Update README.md
yushengsu-thu Nov 12, 2023
c16ee0a
fix: local llm support #100
chenweize1998 Nov 13, 2023
d434c5a
fix: output parser error in demo case [ci skip]
chenweize1998 Nov 15, 2023
1c92dbe
doc: add a simple documentation (#91)
elolelo Nov 20, 2023
33e61d1
feat: support docker (#107)
soulteary Dec 28, 2023
5fb1f77
feat: allow custom openai base url (#108)
soulteary Dec 28, 2023
4c16c42
Update README.md on the news (#118)
Kunlun-Zhu Jan 18, 2024
ebcf88b
fix: dependency and typing error #120
chenweize1998 Mar 6, 2024
fa916e1
Update README.md
yushengsu-thu Mar 21, 2024
c7e5c1c
OpenAI 1.0 and vLLMs support (#127)
chenweize1998 Mar 24, 2024
6e6dff6
fix: github action
chenweize1998 Mar 24, 2024
c755193
Update openai.py
1ring2rta Apr 25, 2024
4dd772d
fix: openai async client bug #130
chenweize1998 Apr 25, 2024
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
Prev Previous commit
Next Next commit
fix: bug in simulation gui. [ci skip]
  • Loading branch information
chenweize1998 committed Oct 25, 2023
commit 14a8f34b61d3666ac0c19aa7d4ecb61546e87f7a
26 changes: 14 additions & 12 deletions agentverse/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, task: str, tasks_dir: str, ui_kwargs: Dict[str, str]):
self.messages = []
self.task = task
self.ui_kwargs = ui_kwargs
if task == "pipeline_brainstorming":
if task == "tasksolving/brainstorming":
self.backend = TaskSolving.from_task(task, tasks_dir)
else:
self.backend = Simulation.from_task(task, tasks_dir)
Expand All @@ -60,9 +60,9 @@ def __init__(self, task: str, tasks_dir: str, ui_kwargs: Dict[str, str]):
def get_avatar(self, idx):
if idx == -1:
img = cv2.imread(f"{IMG_PATH}/db_diag/-1.png")
elif self.task == "prisoner_dilemma":
elif self.task == "simulation/prisoner_dilemma":
img = cv2.imread(f"{IMG_PATH}/prison/{idx}.png")
elif self.task == "db_diag":
elif self.task == "simulation/db_diag":
img = cv2.imread(f"{IMG_PATH}/db_diag/{idx}.png")
elif "sde" in self.task:
img = cv2.imread(f"{IMG_PATH}/sde/{idx}.png")
Expand Down Expand Up @@ -164,9 +164,9 @@ def reset(self, stu_num=0):
self.backend.reset()
self.turns_remain = self.backend.environment.max_turns

if self.task == "prisoner_dilemma":
if self.task == "simulation/prisoner_dilemma":
background = cv2.imread(f"{IMG_PATH}/prison/case_1.png")
elif self.task == "db_diag":
elif self.task == "simulation/db_diag":
background = cv2.imread(f"{IMG_PATH}/db_diag/background.png")
elif "sde" in self.task:
background = cv2.imread(f"{IMG_PATH}/sde/background.png")
Expand Down Expand Up @@ -201,7 +201,7 @@ def gen_img(self, data: List[Dict]):
# if len(data) != self.stu_num:
if len(data) != self.stu_num + 1:
raise gr.Error("data length is not equal to the total number of students.")
if self.task == "prisoner_dilemma":
if self.task == "simulation/prisoner_dilemma":
img = cv2.imread(f"{IMG_PATH}/speaking.png", cv2.IMREAD_UNCHANGED)
if (
len(self.messages) < 2
Expand All @@ -219,7 +219,7 @@ def gen_img(self, data: List[Dict]):
cover_img(background, img, (550, 480))
if data[2]["message"] != "":
cover_img(background, img, (550, 880))
elif self.task == "db_diag":
elif self.task == "simulation/db_diag":
background = cv2.imread(f"{IMG_PATH}/db_diag/background.png")
img = cv2.imread(f"{IMG_PATH}/db_diag/speaking.png", cv2.IMREAD_UNCHANGED)
if data[0]["message"] != "":
Expand Down Expand Up @@ -262,7 +262,9 @@ def gen_img(self, data: List[Dict]):
img = cv2.imread(f"{IMG_PATH}/hand.png", cv2.IMREAD_UNCHANGED)
cover_img(background, img, (h_begin - 90, w_begin + 10))
elif data[stu_cnt]["message"] not in ["", "[RaiseHand]"]:
img = cv2.imread(f"{IMG_PATH}/speaking.png", cv2.IMREAD_UNCHANGED)
img = cv2.imread(
f"{IMG_PATH}/speaking.png", cv2.IMREAD_UNCHANGED
)
cover_img(background, img, (h_begin - 90, w_begin + 10))

else:
Expand All @@ -274,7 +276,7 @@ def return_format(self, messages: List[Message]):
_format = [{"message": "", "sender": idx} for idx in range(len(self.agent_id))]

for message in messages:
if self.task == "db_diag":
if self.task == "simulation/db_diag":
content_json: dict = message.content
content_json[
"diagnose"
Expand Down Expand Up @@ -342,7 +344,7 @@ def gen_message(self):
avatar = self.get_avatar(-1)
else:
avatar = self.get_avatar((sender - 1) % 11 + 1)
if self.task == "db_diag":
if self.task == "simulation/db_diag":
msg_json = json.loads(msg)
self.solution_status = [False] * self.tot_solutions
msg = msg_json["diagnose"]
Expand Down Expand Up @@ -421,7 +423,7 @@ def submit(self, message: str):
return self.gen_img([{"message": ""}] * len(self.agent_id)), self.gen_message()

def launch(self, single_agent=False, discussion_mode=False):
if self.task == "pipeline_brainstorming":
if self.task == "tasksolving/brainstorming":
with gr.Blocks() as demo:
chatbot = gr.Chatbot(height=800, show_label=False)
msg = gr.Textbox(label="Input")
Expand Down Expand Up @@ -478,7 +480,7 @@ def respond(message, chat_history):
# stu_num = gr.Number(label="Student Number", precision=0)
# stu_num = self.stu_num

if self.task == "db_diag":
if self.task == "simulation/db_diag":
user_msg = gr.Textbox()
submit_btn = gr.Button("Submit", variant="primary")

Expand Down