Skip to content

Commit

Permalink
patches
Browse files Browse the repository at this point in the history
  • Loading branch information
ARajgor committed Mar 29, 2024
1 parent b35ba74 commit ae18354
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/agents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,24 +282,24 @@ def execute(self, prompt: str, project_name_from_user: str = None):

self.agent_state.set_agent_active(project_name, True)

print("\n plans:: ", plans)
print("\nplans:: ", plans)
self.project_manager.add_message_from_devika(project_name, reply)
self.project_manager.add_message_from_devika(project_name, json.dumps(plans, indent=4))
# self.project_manager.add_message_from_devika(project_name, f"In summary: {summary}")

self.update_contextual_keywords(focus)
print("\n context_keywords :: ", self.collected_context_keywords)
print("\ncontext_keywords :: ", self.collected_context_keywords)

internal_monologue = self.internal_monologue.execute(current_prompt=plan)
print("\n internal_monologue :: ", internal_monologue)
print("\ninternal_monologue :: ", internal_monologue)
print("=====" * 10)

new_state = self.agent_state.new_state()
new_state["internal_monologue"] = internal_monologue
self.agent_state.add_to_current_state(project_name, new_state)

research = self.researcher.execute(plan, self.collected_context_keywords)
print("\n research :: ", research)
print("\nresearch :: ", research)
print("=====" * 10)

queries = research["queries"]
Expand Down
4 changes: 2 additions & 2 deletions src/browser/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class Browser:
def __init__(self):
self.playwright = sync_playwright().start()
chromium = self.playwright.chromium
self.browser = chromium.launch()
self.browser = chromium.launch(headless=True)
self.page = self.browser.new_page()

def new_page(self):
return self.browser.new_page()

def go_to(self, url):
self.page.goto(url)
self.page.goto(url, wait_until="load")

def screenshot(self, project_name):
screenshots_save_path = Config().get_screenshots_dir()
Expand Down
2 changes: 1 addition & 1 deletion src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class Config:
def __init__(self):
self.config = toml.load("sample.config.toml")
self.config = toml.load("config.toml")

def get_config(self):
return self.config
Expand Down

0 comments on commit ae18354

Please sign in to comment.