Skip to content

Commit

Permalink
avoid warning on additional skills
Browse files Browse the repository at this point in the history
  • Loading branch information
teaxio committed Sep 6, 2024
1 parent b501540 commit 5c8c527
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ae/core/agents/browser_nav_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ def __load_additional_skills(self):
specified by an environment variable.
"""
# Get additional skill directories or files from environment variable
additional_skill_paths: list[str] = os.getenv('ADDITIONAL_SKILL_DIRS', "").split(',')
additional_skill_dirs: str = os.getenv('ADDITIONAL_SKILL_DIRS', "")
if len(additional_skill_dirs) == 0:
logger.debug("No additional skill directories or files specified.")
return

additional_skill_paths: list[str] = additional_skill_dirs.split(',')

for skill_path in additional_skill_paths:
skill_path = skill_path.strip() # Strip whitespace
Expand All @@ -148,7 +153,6 @@ def __load_additional_skills(self):
directory_path = os.path.dirname(skill_path).replace('/', '.')
module_path = f"{directory_path}.{module_name}"
importlib.import_module(module_path)

else:
logger.warning(f"Invalid skill path specified: {skill_path}")

Expand Down

0 comments on commit 5c8c527

Please sign in to comment.