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

Fix typo #94

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions autogen/agentchat/contrib/agent_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@

According to the information I provide, please take one of four actions to manipulate list B using the functions you know.
Instead of returning TERMINATE directly or taking no action, you should try your best to optimize the function list. Only take no action if you really think the current list is optimal, as more actions will harm performance in future tasks.
Even adding a general function that can substitute the assistants repeated suggestions of Python code with the same functionality could also be helpful.
Even adding a general function that can substitute the assistant's repeated suggestions of Python code with the same functionality could also be helpful.
"""


Expand Down Expand Up @@ -295,10 +295,10 @@ def step(self):
)

register_for_llm = []
register_for_exector = {}
register_for_executor = {}
for name in remove_functions:
register_for_llm.append({"func_sig": {"name": name}, "is_remove": True})
register_for_exector.update({name: None})
register_for_executor.update({name: None})
for func in incumbent_functions:
register_for_llm.append(
{
Expand All @@ -310,7 +310,7 @@ def step(self):
"is_remove": False,
}
)
register_for_exector.update(
register_for_executor.update(
{
func.get("name"): lambda **args: execute_func(
func.get("name"), func.get("packages"), func.get("code"), **args
Expand All @@ -319,7 +319,7 @@ def step(self):
)

self._trial_functions = incumbent_functions
return register_for_llm, register_for_exector
return register_for_llm, register_for_executor

def reset_optimizer(self):
"""
Expand Down
Loading
Loading