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

Bring in DEV with planner/nested chat #61

Merged
merged 174 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
205ea9f
interim commit
deepak-akkil Apr 15, 2024
ef0cdd2
Interim commit
deepak-akkil May 3, 2024
825867e
nested chat
deepak-akkil May 13, 2024
a083eb7
first working version of hierarchial chat
deepak-akkil May 20, 2024
b73b1a5
Merge remote-tracking branch 'origin/dev' into nested_chat_for_hierar…
deepak-akkil May 20, 2024
7b8d9db
Different changes to make planner more robust
deepak-akkil May 23, 2024
24f6627
Decent version
deepak-akkil May 28, 2024
c5a3413
Stable verison
deepak-akkil May 29, 2024
f572619
Hover as a skill
deepak-akkil May 30, 2024
335dc80
Minor improvements
deepak-akkil May 30, 2024
d645a1d
Some cleanup
deepak-akkil Jun 3, 2024
5c57b58
clean up of ununsed functions
deepak-akkil Jun 3, 2024
e4f96ec
Remove ununsed functions and cleanup relating to memory
deepak-akkil Jun 3, 2024
3283ca2
Minor clean ups
deepak-akkil Jun 3, 2024
faadea8
Cleanup
deepak-akkil Jun 3, 2024
7b0ef80
improve prompt to ensure task has answer
deepak-akkil Jun 5, 2024
c6a41b3
Revert to version of get_detailed_accessibility_tree in dev
deepak-akkil Jun 5, 2024
442177f
Update prompts.py
deepak-akkil Jun 5, 2024
773803f
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
deepak-akkil Jun 6, 2024
de493ff
Merge dev into planner
deepak-akkil Jun 6, 2024
5b97eda
bug fixes and prompt changes
deepak-akkil Jun 7, 2024
5a252c9
minor prompt changes
deepak-akkil Jun 7, 2024
dbbbf43
minor prompt improvements
deepak-akkil Jun 7, 2024
83c3d6a
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
deepak-akkil Jun 7, 2024
b8ff203
minor prompt improvements
deepak-akkil Jun 7, 2024
561357f
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
deepak-akkil Jun 7, 2024
d6740ff
fix error due to merge
deepak-akkil Jun 7, 2024
7b572c7
requirements missing nest-asyncio
Jun 7, 2024
aea1c7c
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 8, 2024
81d2278
formatting the manual testing input
Jun 8, 2024
c4d08f1
giving every test entry a numeric value
Jun 8, 2024
dc7ba9d
dry run file for annotators
Jun 10, 2024
bae8254
Minor prompt changes
deepak-akkil Jun 10, 2024
5f679fb
prompt updates
deepak-akkil Jun 10, 2024
a54be3b
Minor prompt changes
deepak-akkil Jun 10, 2024
f570d03
Bug fix to ensure no error is raised when execution stops due to max …
deepak-akkil Jun 10, 2024
1b28baa
bug fix to ensure evaluator loop does not break when agent response i…
deepak-akkil Jun 10, 2024
9b30b59
Change temperature of planner to 0
deepak-akkil Jun 10, 2024
5d3b6f2
Minor prompt changes
deepak-akkil Jun 10, 2024
8e823c8
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 10, 2024
e950676
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
deepak-akkil Jun 10, 2024
79d07c4
added task index
Jun 10, 2024
fa1770b
put out task id
Jun 10, 2024
995337b
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 11, 2024
3ed0f2e
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 11, 2024
c18cd95
saving nested chat logs
Jun 11, 2024
eaa5a88
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 11, 2024
a587e77
interim commit
deepak-akkil Jun 11, 2024
19e4332
prompt changes
deepak-akkil Jun 11, 2024
7b5559d
Merge branch 'nested_chat_for_hierarchial_planning-' of https://githu…
deepak-akkil Jun 11, 2024
b83d09e
Disable caching altogether
deepak-akkil Jun 11, 2024
d39e537
Remove memory
deepak-akkil Jun 11, 2024
1568a4b
Merge branch 'nested_chat_for_hierarchial_planning-' into nested_chat…
deepak-akkil Jun 11, 2024
ccf003a
interim
deepak-akkil Jun 11, 2024
0671f9a
Minor change to nudge on DOM observer change
deepak-akkil Jun 11, 2024
a5194d9
interim
deepak-akkil Jun 11, 2024
8aad69d
Whole bunch of changes to be able to interact with loops
deepak-akkil Jun 11, 2024
fead5b3
Merge branch 'nested_chat_for_planning_DEV' into nested_chat_for_hier…
deepak-akkil Jun 11, 2024
091ade3
Update prompts.py
deepak-akkil Jun 11, 2024
7e9dbe0
prompt changes, remove get_user_input skill
deepak-akkil Jun 11, 2024
7d5ccfa
remove unnecessay print statement
deepak-akkil Jun 12, 2024
5e60699
listbox changes
deepak-akkil Jun 12, 2024
f565290
remove focus after click
deepak-akkil Jun 12, 2024
3dd835c
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
deepak-akkil Jun 12, 2024
2103ea8
interim commit
deepak-akkil Jun 13, 2024
5ff7389
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
deepak-akkil Jun 13, 2024
dfdd580
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 13, 2024
ca3b6d6
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 13, 2024
9c171d3
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 13, 2024
086efc3
aggregate test results
Jun 13, 2024
3320bb6
interim commit
deepak-akkil Jun 14, 2024
a7ba88f
Merge branch 'nested_chat_for_hierarchial_planning-' of https://githu…
deepak-akkil Jun 14, 2024
cc1fa6f
minor prompt changes
deepak-akkil Jun 14, 2024
5ead807
interim commit
deepak-akkil Jun 14, 2024
8a284d7
minor prompt change
deepak-akkil Jun 14, 2024
f3c5491
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 14, 2024
1f7ca02
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
Jun 14, 2024
b3a11c5
Merge branch 'nested_chat_for_hierarchial_planning-' of https://githu…
deepak-akkil Jun 14, 2024
eb45f19
add pdf extraction skill
Jun 14, 2024
a19031f
disable addition of PDF skllls
Jun 14, 2024
5c5bde4
notify the user about PDF stats
Jun 14, 2024
a74f87a
adding explanatory comments
Jun 14, 2024
8805c62
Minor prompt changes
deepak-akkil Jun 14, 2024
970f938
Merge branch 'nested_chat_for_hierarchial_planning-' of https://githu…
deepak-akkil Jun 14, 2024
a6853ca
fix an inconsistency in webvoyager
deepak-akkil Jun 14, 2024
e3624ca
Merge branch 'dev' into nested_chat_for_hierarchial_planning-
deepak-akkil Jun 14, 2024
a06f480
A lot of changes
deepak-akkil Jun 14, 2024
1e9820f
Fix issues with json parsing
deepak-akkil Jun 15, 2024
d1ad13d
minor prompt change
deepak-akkil Jun 15, 2024
6878582
Prompt update
deepak-akkil Jun 15, 2024
54fd0b1
prompt update
deepak-akkil Jun 15, 2024
2546df3
Minor prompt update
deepak-akkil Jun 15, 2024
7a5c8ba
minor prompt update
deepak-akkil Jun 15, 2024
e35a7bc
minor prompt update
deepak-akkil Jun 15, 2024
0f2aa32
prompt update
deepak-akkil Jun 15, 2024
e07caf9
prompt change
deepak-akkil Jun 15, 2024
612449a
prompt update
deepak-akkil Jun 15, 2024
0f9913f
minor prompt change
deepak-akkil Jun 15, 2024
f8d86d0
emphasise to find perfect answer without compromising
deepak-akkil Jun 15, 2024
d01ac39
minor change
deepak-akkil Jun 15, 2024
0482b43
Prompt update
deepak-akkil Jun 15, 2024
54040ff
prompt update
deepak-akkil Jun 15, 2024
044d0f9
Update prompts.py
deepak-akkil Jun 15, 2024
3142c70
Update prompts.py
deepak-akkil Jun 15, 2024
70f2ba9
More complex example in prompt
deepak-akkil Jun 15, 2024
573df21
Update prompts.py
deepak-akkil Jun 15, 2024
87ce8a9
minor prompt change for browser nav agent
deepak-akkil Jun 15, 2024
42ba7ed
prompt change
deepak-akkil Jun 15, 2024
d3fd5db
minor prompt changes
deepak-akkil Jun 15, 2024
d7ef4e3
minor prompt change
deepak-akkil Jun 15, 2024
6b447d1
fix spelling mistake
deepak-akkil Jun 15, 2024
1d2e55a
prompt
deepak-akkil Jun 15, 2024
ad25a7c
Update prompts.py
deepak-akkil Jun 15, 2024
c314efd
Update prompts.py
deepak-akkil Jun 15, 2024
5625361
Update prompts.py
deepak-akkil Jun 15, 2024
6fdb3c3
prompt update
deepak-akkil Jun 15, 2024
676f8da
Update prompts.py
deepak-akkil Jun 15, 2024
fcdf24f
Update prompts.py
deepak-akkil Jun 15, 2024
68ed46d
Update prompts.py
deepak-akkil Jun 15, 2024
4ace466
Minor update
deepak-akkil Jun 15, 2024
cdd8f60
Update prompts.py
deepak-akkil Jun 15, 2024
818b43c
Update prompts.py
deepak-akkil Jun 15, 2024
727267e
Update prompts.py
deepak-akkil Jun 15, 2024
b3c7ee9
Update prompts.py
deepak-akkil Jun 15, 2024
672e14c
Update prompts.py
deepak-akkil Jun 15, 2024
28f5333
Update prompts.py
deepak-akkil Jun 15, 2024
0199b1f
Update prompts.py
deepak-akkil Jun 15, 2024
d6ad66e
Update prompts.py
deepak-akkil Jun 15, 2024
ac0d84d
Update prompts.py
deepak-akkil Jun 15, 2024
31dd220
Update prompts.py
deepak-akkil Jun 15, 2024
67c2f0a
Update prompts.py
deepak-akkil Jun 15, 2024
9e961d6
Update prompts.py
deepak-akkil Jun 15, 2024
55c395f
Update prompts.py
deepak-akkil Jun 16, 2024
3d75f2a
Update prompts.py
deepak-akkil Jun 16, 2024
75fdcd1
Update prompts.py
deepak-akkil Jun 16, 2024
63212ff
Update prompts.py
deepak-akkil Jun 16, 2024
2576742
Update prompts.py
deepak-akkil Jun 16, 2024
34e036d
Update prompts.py
deepak-akkil Jun 16, 2024
5a9ef74
Update prompts.py
deepak-akkil Jun 16, 2024
f30dc60
Update prompts.py
deepak-akkil Jun 16, 2024
353cac4
Update prompts.py
deepak-akkil Jun 16, 2024
f641319
Update prompts.py
deepak-akkil Jun 16, 2024
cb35731
Update prompts.py
deepak-akkil Jun 16, 2024
62d39b6
Update prompts.py
deepak-akkil Jun 16, 2024
ecfa6e9
Update prompts.py
deepak-akkil Jun 16, 2024
a0c4da6
Update prompts.py
deepak-akkil Jun 16, 2024
71c6d09
Update prompts.py
deepak-akkil Jun 16, 2024
2134afd
Update prompts.py
deepak-akkil Jun 16, 2024
896ca63
Update prompts.py
deepak-akkil Jun 16, 2024
7175469
Update prompts.py
deepak-akkil Jun 16, 2024
103992d
Update prompts.py
deepak-akkil Jun 16, 2024
95b18a0
Update prompts.py
deepak-akkil Jun 16, 2024
d94545e
added two examples
deepak-akkil Jun 16, 2024
e247536
minor update
deepak-akkil Jun 16, 2024
c6563a6
Update prompts.py
deepak-akkil Jun 16, 2024
c881067
Update prompts.py
deepak-akkil Jun 16, 2024
e93c690
Nested chat for hierarchial planning (#35)
deepak-akkil Jun 17, 2024
8b050af
Merge branch 'dev' of https://github.com/EmergenceAI/Agent-E into dev
deepak-akkil Jun 17, 2024
2482a93
Minor modification to make planner more generic for dev
deepak-akkil Jun 17, 2024
a5a1106
Nested chat for hierarchial planning (#49)
deepak-akkil Jun 17, 2024
9765f67
benchmark test results aggregation output HTML
Jun 17, 2024
4bf598c
interim commit
deepak-akkil Jun 19, 2024
19117da
call backend orchestrator
Jun 20, 2024
71f45d8
fix bug
Jun 20, 2024
f1ceaa5
Merge branch 'dev' into connect_optional_backend_orchestrator
Jun 20, 2024
775454b
expand max turns
Jun 20, 2024
209ed3b
Merge pull request #51 from EmergenceAI/connect_optional_backend_orch…
teaxio Jun 20, 2024
9a5bec4
allow adjusting results by failing ones that passed
Jun 20, 2024
dbebda1
fixed bug result is not a dictionary
Jun 21, 2024
49d39cc
linting and remove non-useful print messages
Jun 21, 2024
c344da4
remove debug logs
Jun 21, 2024
cfdb70c
print command
Jun 21, 2024
5d4f9f2
better HTML output of aggregated test results
Jun 21, 2024
c6e6157
Merge pull request #57 from EmergenceAI/fix-discord
teaxio Jun 27, 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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,7 @@ cython_debug/
ae/log_files/*
ae/temp/*
test/logs/*
test/results/*
test/results/*
Pipfile.lock
requirements.txt
Pipfile
3 changes: 1 addition & 2 deletions ae/core/agents/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from ae.core.agents.browser_nav_agent import BrowserNavAgent
from ae.core.agents.browser_nav_agent_no_skills import BrowserNavAgentNoSkills
from ae.core.agents.browser_nav_agent import BrowserNavAgent
68 changes: 37 additions & 31 deletions ae/core/agents/browser_nav_agent.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
from datetime import datetime
from string import Template

import autogen # type: ignore
from autogen.agentchat.conversable_agent import register_function # type: ignore

from ae.core.memory.static_ltm import get_user_ltm
from ae.core.post_process_responses import final_reply_callback_browser_agent as print_message_from_user_proxy # type: ignore
from ae.core.post_process_responses import final_reply_callback_user_proxy as print_message_from_browser_agent # type: ignore
from ae.core.prompts import LLM_PROMPTS
from ae.core.skills.click_using_selector import click as click_element
from ae.core.skills.enter_text_and_click import enter_text_and_click
from ae.core.skills.enter_text_using_selector import bulk_enter_text
from ae.core.skills.enter_text_and_click import enter_text_and_click
from ae.core.skills.pdf_text_extractor import extract_text_from_pdf
from ae.core.skills.enter_text_using_selector import entertext
from ae.core.skills.get_dom_with_content_type import get_dom_with_content_type
from ae.core.skills.get_url import geturl
from ae.core.skills.get_user_input import get_user_input
from ae.core.skills.open_url import openurl
from ae.core.skills.pdf_text_extractor import extract_text_from_pdf
#from ae.core.skills.pdf_text_extractor import extract_text_from_pdf
from ae.core.skills.press_key_combination import press_key_combination



class BrowserNavAgent:
def __init__(self, config_list, user_proxy_agent: autogen.UserProxyAgent): # type: ignore
def __init__(self, config_list, browser_nav_executor: autogen.UserProxyAgent): # type: ignore
"""
Initialize the BrowserNavAgent and store the AssistantAgent instance
as an instance attribute for external access.
Expand All @@ -27,20 +31,20 @@ def __init__(self, config_list, user_proxy_agent: autogen.UserProxyAgent): # typ
- config_list: A list of configuration parameters required for AssistantAgent.
- user_proxy_agent: An instance of the UserProxyAgent class.
"""
self.user_proxy_agent = user_proxy_agent
self.browser_nav_executor = browser_nav_executor
user_ltm = self.__get_ltm()
system_message = LLM_PROMPTS["BROWSER_AGENT_PROMPT"]

system_message = system_message + "\n" + f"Today's date is {datetime.now().strftime('%d %B %Y')}"
if user_ltm: #add the user LTM to the system prompt if it exists
user_ltm = "\n" + user_ltm
system_message = Template(system_message).substitute(basic_user_information=user_ltm)

self.agent = autogen.AssistantAgent(
self.agent = autogen.ConversableAgent(
name="browser_navigation_agent",
system_message=system_message,
llm_config={
"config_list": config_list,
"cache_seed": 2,
"cache_seed": None,
"temperature": 0.0
},
)
Expand All @@ -59,54 +63,53 @@ def __register_skills(self):
"""
Register all the skills that the agent can perform.
"""
# Register get_user_input skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(get_user_input) # type: ignore
# Register get_user_input skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["GET_USER_INPUT_PROMPT"])(get_user_input) # type: ignore

# Register openurl skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(openurl) # type: ignore
# Register openurl skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["OPEN_URL_PROMPT"])(openurl) # type: ignore
self.agent.register_for_llm(description=LLM_PROMPTS["OPEN_URL_PROMPT"])(openurl)
# Register openurl skill for execution by user_proxy_agent
self.browser_nav_executor.register_for_execution()(openurl)

# Register enter_text_and_click skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(enter_text_and_click)
# Register enter_text_and_click skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["ENTER_TEXT_AND_CLICK_PROMPT"])(enter_text_and_click)
# Register enter_text_and_click skill for execution by user_proxy_agent
self.browser_nav_executor.register_for_execution()(enter_text_and_click)

# Register get_dom_with_content_type skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(get_dom_with_content_type)
# Register get_dom_with_content_type skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["GET_DOM_WITH_CONTENT_TYPE_PROMPT"])(get_dom_with_content_type)
# Register get_dom_with_content_type skill for execution by user_proxy_agent
self.browser_nav_executor.register_for_execution()(get_dom_with_content_type)

# Register click_element skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(click_element)
# Register click_element skill for LLM by assistant agent
#self.agent.register_for_llm(description=LLM_PROMPTS["CLICK_PROMPT_ACCESSIBILITY"])(click_element)
self.agent.register_for_llm(description=LLM_PROMPTS["CLICK_PROMPT"])(click_element)
# Register click_element skill for execution by user_proxy_agent
self.browser_nav_executor.register_for_execution()(click_element)

# Register geturl skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(geturl)
# Register geturl skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["GET_URL_PROMPT"])(geturl)
# Register geturl skill for execution by user_proxy_agent
self.browser_nav_executor.register_for_execution()(geturl)

# Register bulk_enter_text skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(bulk_enter_text)
# Register bulk_enter_text skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["BULK_ENTER_TEXT_PROMPT"])(bulk_enter_text)
# Register bulk_enter_text skill for execution by user_proxy_agent
self.browser_nav_executor.register_for_execution()(bulk_enter_text)

# Register entertext skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(entertext)
# Register entertext skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["ENTER_TEXT_PROMPT"])(entertext)

# Register entertext skill for execution by user_proxy_agent
self.user_proxy_agent.register_for_execution()(extract_text_from_pdf)
self.browser_nav_executor.register_for_execution()(entertext)

# Register entertext skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["PRESS_KEY_COMBINATION_PROMPT"])(press_key_combination)
# Register entertext skill for execution by user_proxy_agent
self.browser_nav_executor.register_for_execution()(press_key_combination)

self.agent.register_for_llm(description=LLM_PROMPTS["EXTRACT_TEXT_FROM_PDF_PROMPT"])(extract_text_from_pdf)
self.browser_nav_executor.register_for_execution()(extract_text_from_pdf)

'''
# Register reply function for printing messages
self.user_proxy_agent.register_reply( # type: ignore
self.browser_nav_executor.register_reply( # type: ignore
[autogen.Agent, None],
reply_func=print_message_from_user_proxy,
config={"callback": None},
Expand All @@ -116,3 +119,6 @@ def __register_skills(self):
reply_func=print_message_from_browser_agent,
config={"callback": None},
)
'''
# print(f">>> Function map: {self.browser_nav_executor.function_map}") # type: ignore
# print(">>> Registered skills for BrowserNavAgent and BrowserNavExecutorAgent")
41 changes: 0 additions & 41 deletions ae/core/agents/browser_nav_agent_no_skills.py

This file was deleted.

61 changes: 61 additions & 0 deletions ae/core/agents/high_level_planner_agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
from datetime import datetime
from string import Template

import autogen # type: ignore
from autogen import Agent # type: ignore
from autogen import ConversableAgent # type: ignore
from autogen import OpenAIWrapper # type: ignore

from ae.core.memory.static_ltm import get_user_ltm
from ae.core.post_process_responses import final_reply_callback_planner_agent as print_message_as_planner # type: ignore
from ae.core.prompts import LLM_PROMPTS
from ae.core.skills.get_user_input import get_user_input


class PlannerAgent:
def __init__(self, config_list, user_proxy_agent:ConversableAgent): # type: ignore
"""
Initialize the PlannerAgent and store the AssistantAgent instance
as an instance attribute for external access.

Parameters:
- config_list: A list of configuration parameters required for AssistantAgent.
- user_proxy_agent: An instance of the UserProxyAgent class.
"""

user_ltm = self.__get_ltm()
system_message = LLM_PROMPTS["PLANNER_AGENT_PROMPT"]

if user_ltm: #add the user LTM to the system prompt if it exists
user_ltm = "\n" + user_ltm
system_message = Template(system_message).substitute(basic_user_information=user_ltm)
system_message = system_message + "\n" + f"Today's date is {datetime.now().strftime('%d %B %Y')}"
self.agent = autogen.AssistantAgent(
name="planner_agent",
system_message=system_message,
llm_config={
"config_list": config_list,
"cache_seed": None,
"temperature": 0.0
},
)

# Register get_user_input skill for LLM by assistant agent
self.agent.register_for_llm(description=LLM_PROMPTS["GET_USER_INPUT_PROMPT"])(get_user_input)
# Register get_user_input skill for execution by user_proxy_agent
user_proxy_agent.register_for_execution()(get_user_input)

self.agent.register_reply( # type: ignore
[autogen.AssistantAgent, None],
reply_func=print_message_as_planner,
config={"callback": None},
ignore_async_in_sync_chat=True
)

def __get_ltm(self):
"""
Get the the long term memory of the user.
returns: str | None - The user LTM or None if not found.
"""
return get_user_ltm()

Loading