Skip to content

Agent Zero AI framework

searxng config radio, todos cleanup

frdel602d60cc8f89
diff --git a/docker/run/fs/etc/searxng/settings.yml b/docker/run/fs/etc/searxng/settings.yml
index 7e6eb506b..147bee3f9 100644
--- a/docker/run/fs/etc/searxng/settings.yml
+++ b/docker/run/fs/etc/searxng/settings.yml
@@ -1,6 +1,11 @@
# SearXNG settings
-use_default_settings: true
+use_default_settings:
+ engines:
+ remove:
+ - radio browser
+# TODO enable radio_browser when it works again
+# currently it crashes on x86 on gethostbyaddr
general:
debug: false
@@ -58,8 +63,10 @@ enabled_plugins:
# - '(.*\.)?wikipedia.org$'
engines:
- - name: radio_browser
+ - name: radio browser
+ engine: radio_browser
disabled: true
+ inactive: true
# TODO enable radio_browser when it works again
# currently it crashes on x86 on gethostbyaddr
diff --git a/python/helpers/document_query.py b/python/helpers/document_query.py
index 62327f055..29234f9ff 100644
--- a/python/helpers/document_query.py
+++ b/python/helpers/document_query.py
@@ -100,7 +100,7 @@ class DocumentQueryStore:
elif scheme in ["http", "https"]:
# Always use https for web URLs
- normalized = normalized.replace("http://", "https://") # TODO why?
+ normalized = normalized.replace("http://", "https://")
return normalized
diff --git a/python/helpers/rag.py b/python/helpers/rag.py
deleted file mode 100644
index 0667fdc05..000000000
--- a/python/helpers/rag.py
+++ /dev/null
@@ -1,60 +0,0 @@
-from typing import List
-
-from langchain_core.documents import Document
-from python.helpers import files
-
-from langchain_community.document_loaders import (
- CSVLoader,
- JSONLoader,
- PyPDFLoader,
- TextLoader,
- UnstructuredHTMLLoader,
- UnstructuredMarkdownLoader,
-)
-
-# def extract_file(path: str) -> List[Document]:
-# pass # TODO finish implementing
-
-def extract_text(content: bytes, chunk_size: int = 128) -> List[str]:
- result = []
-
- def is_binary_chunk(chunk: bytes) -> bool:
- # Check for high concentration of control chars
- try:
- text = chunk.decode("utf-8", errors="ignore")
- control_chars = sum(1 for c in text if ord(c) < 32 and c not in "\n\r\t")
- return control_chars / len(text) > 0.3
- except UnicodeDecodeError:
- return True
-
- # Process the content in overlapping chunks to handle boundaries
- pos = 0
- while pos < len(content):
- # Get current chunk with overlap
- chunk_end = min(pos + chunk_size, len(content))
-
- # Add overlap to catch word boundaries, unless at end of content
- if chunk_end < len(content):
- # Look ahead for next newline or space to avoid splitting words
- for i in range(chunk_end, min(chunk_end + 100, len(content))):
- if content[i : i + 1] in [b" ", b"\n", b"\r"]:
- chunk_end = i + 1
- break
-
- chunk = content[pos:chunk_end]
-
- if is_binary_chunk(chunk):
- if not result or result[-1] != "[BINARY]":
- result.append("[BINARY]")
- else:
- try:
- text = chunk.decode("utf-8", errors="ignore").strip()
- if text: # Only add non-empty text chunks
- result.append(text)
- except UnicodeDecodeError:
- if not result or result[-1] != "[BINARY]":
- result.append("[BINARY]")
-
- pos = chunk_end
-
- return result
diff --git a/python/tools/scheduler.py b/python/tools/scheduler.py
index d1c3b6d96..8263ecad2 100644
--- a/python/tools/scheduler.py
+++ b/python/tools/scheduler.py
@@ -183,7 +183,7 @@ class SchedulerTool(Tool):
await TaskScheduler.get().add_task(task)
return Response(message=f"Adhoc task '{name}' created: {task.uuid}", break_loop=False)
- async def create_planned_task(self, **kwargs) -> Response: # TODO: Implement
+ async def create_planned_task(self, **kwargs) -> Response:
name: str = kwargs.get("name", None)
system_prompt: str = kwargs.get("system_prompt", None)
prompt: str = kwargs.get("prompt", None)