fix: browser bug

This commit is contained in:
martin legrand 2025-04-07 14:55:41 +02:00
parent ff8fdddbdc
commit 21bf224fef
6 changed files with 7 additions and 3 deletions

View File

@ -8,7 +8,7 @@
#!/bin/bash
# Define the URL and filename
URL="https://huggingface.co/adaptive-classifier/llm_router/resolve/main/model.safetensors"
URL="https://huggingface.co/adaptive-classifier/llm-router/resolve/main/model.safetensors"
FILENAME="model.safetensors"
if [ ! -f "$FILENAME" ]; then

View File

@ -43,6 +43,7 @@ rules:
- You are forbidden to use command such as find or locate, use only file_finder for finding path.
- Do not ever use editor such as vim or nano.
- Make sure to always cd your work folder before executing commands, like cd <work dir> && <your command>
- only use file name with file_finder, not path
Example Interaction
User: "I need to find the file config.txt and read its contents."

View File

@ -53,6 +53,7 @@ rules:
- You are forbidden to use command such as find or locate, use only file_finder for finding path.
- Make sure to always cd your work folder before executing commands, like cd <work dir> && <your command>
- Do not ever use editor such as vim or nano.
- only use file name with file_finder, not path
Example Interaction
User: "I need to find the file config.txt and read its contents."

View File

@ -311,6 +311,8 @@ class BrowserAgent(Agent):
links = self.parse_answer(answer)
link = self.select_link(links)
self.search_history.append(link)
hist = '\n'.join([x for x in self.search_history if x is not None])
pretty_print(hist, color="warning")
if "REQUEST_EXIT" in answer:
pretty_print(f"Agent requested exit.", color="status")

View File

@ -83,7 +83,7 @@ class PlannerAgent(Agent):
def show_plan(self, json_plan: dict) -> None:
agents_tasks = self.parse_agent_tasks(json_plan)
if agents_tasks == (None, None):
pretty_print("Failed to make a plan.", color="failure")
pretty_print("Failed to make a plan. This can happen with (too) small LLM. Clarify your request and insist on it making a plan.", color="failure")
return
pretty_print("\n▂▘ P L A N ▝▂", color="status")
for task_name, task in agents_tasks:

View File

@ -85,7 +85,7 @@ class FileFinder(Tools):
results = []
for block in blocks:
filename = block.split(":")[0]
file_path = self.recursive_search(self.current_dir, filename)
file_path = self.recursive_search(self.work_dir, filename)
if file_path is None:
results.append({"filename": filename, "error": "File not found"})
continue