mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 11:05:26 +00:00
fix : possible crash with planner agent if wrong format returned by llm
This commit is contained in:
parent
8ccb6f4d77
commit
b34e343535
@ -74,6 +74,8 @@ class PlannerAgent(Agent):
|
||||
|
||||
def show_plan(self, json_plan):
|
||||
agents_tasks = self.parse_agent_tasks(json_plan)
|
||||
if agents_tasks == (None, None):
|
||||
return
|
||||
pretty_print(f"--- Plan ---", color="output")
|
||||
for task_name, task in agents_tasks:
|
||||
pretty_print(f"{task}", color="output")
|
||||
|
@ -155,7 +155,6 @@ class Browser:
|
||||
for element in soup(['script', 'style']):
|
||||
element.decompose()
|
||||
|
||||
|
||||
text = soup.get_text()
|
||||
lines = (line.strip() for line in text.splitlines())
|
||||
chunks = (phrase.strip() for line in lines for phrase in line.split(" "))
|
||||
|
@ -2,7 +2,6 @@ import os
|
||||
import sys
|
||||
import torch
|
||||
from transformers import pipeline
|
||||
# adaptive-classifier==0.0.10
|
||||
from adaptive_classifier import AdaptiveClassifier
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user