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

promote Dev #105

Merged
merged 29 commits into from
Sep 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
130d579
Capability to load skills from external location
Aug 26, 2024
b501540
readme instructions for ADDITIONAL_SKILL_DIRS env var
Aug 28, 2024
5c8c527
avoid warning on additional skills
Sep 6, 2024
01ddb7d
bug fix
deepak-akkil Sep 6, 2024
14f55a8
Merge pull request #99 from EmergenceAI/fix_test_processor_config
deepak-akkil Sep 6, 2024
102d8ca
Windows-specific commands for running server locally
danielkornev Sep 7, 2024
d21f667
first version of loop detection
deepak-akkil Sep 10, 2024
b0e99ad
minor change in return statement
deepak-akkil Sep 10, 2024
ec1d0b9
Make LLM config available in API route
deepak-akkil Sep 10, 2024
096a4c8
Merge pull request #100 from danielkornev/patch-1
deepak-akkil Sep 10, 2024
d1e04ef
do not open the url, if browser already in it
deepak-akkil Sep 10, 2024
9035f88
config for allowing planner to have user input
Sep 10, 2024
0c15f6e
Updates to make LLM config dict[str,Any]
deepak-akkil Sep 11, 2024
51ac2d8
clean up print statements
deepak-akkil Sep 11, 2024
54c6256
Update README.md
deepak-akkil Sep 11, 2024
0a57d03
linting
Sep 11, 2024
9c69db6
remove unneeded import
Sep 11, 2024
5c45327
Merge pull request #102 from EmergenceAI/llm-config-in-api-route
teaxio Sep 11, 2024
df8a745
linting
Sep 12, 2024
f0365df
Merge pull request #101 from EmergenceAI/loop_detection
teaxio Sep 12, 2024
c24c6e9
max chat rounds for planner and browser nav agents
Sep 12, 2024
5228dc4
detect if ran out of turns and send a message about it
Sep 15, 2024
6e79ac9
Merge pull request #103 from EmergenceAI/max_chat_rounds
teaxio Sep 16, 2024
14653e1
bug fix regarding saving planner chatter
deepak-akkil Sep 16, 2024
54b6081
Merge branch 'dev' of https://github.com/EmergenceAI/Agent-E into dev
deepak-akkil Sep 16, 2024
80ef975
bug fix regarding saving planner chatter in api route
deepak-akkil Sep 16, 2024
c888423
incorrect instructions in readme
Sep 16, 2024
fed2962
typo
Sep 16, 2024
7f48ba6
Ability to enable more verbose logging for openai and autogen
Sep 16, 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
do not open the url, if browser already in it
Sometimes LLMs can make mistake and ask for open_url when already in the page.
This can sometimes lead to reseting the page state (e.g. if certain text was already entered in the text fields, they get lost).
This change prevents this from happening
  • Loading branch information
deepak-akkil committed Sep 10, 2024
commit d1e04ef2a7711db14f8104a42050474819540c3b
13 changes: 10 additions & 3 deletions ae/core/skills/open_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ async def openurl(url: Annotated[str, "The URL to navigate to. Value must includ
browser_manager = PlaywrightManager(browser_type='chromium', headless=False)
await browser_manager.get_browser_context()
page = await browser_manager.get_current_page()
# Navigate to the URL with a short timeout to ensure the initial load starts
function_name = inspect.currentframe().f_code.co_name # type: ignore
try:
await browser_manager.take_screenshots(f"{function_name}_start", page)
url = ensure_protocol(url)
if page.url == url:
logger.info(f"Current page URL is the same as the new URL: {url}. No need to refresh.")
title = await page.title()
return f"Page already loaded: {url}, Title: {title}" # type: ignore

# Navigate to the URL with a short timeout to ensure the initial load starts
function_name = inspect.currentframe().f_code.co_name # type: ignore

await browser_manager.take_screenshots(f"{function_name}_start", page)

await page.goto(url, timeout=timeout*1000) # type: ignore
except PlaywrightTimeoutError as pte:
logger.warn(f"Initial navigation to {url} failed: {pte}. Will try to continue anyway.") # happens more often than not, but does not seem to be a problem
Expand Down