Skip to content

Agent Zero AI framework

test fixes

frdelfbb0a072cd49
diff --git a/docker/run/fs/ins/install_searxng.sh b/docker/run/fs/ins/install_searxng.sh
index ee9ad3d1c..fdc7775ad 100644
--- a/docker/run/fs/ins/install_searxng.sh
+++ b/docker/run/fs/ins/install_searxng.sh
@@ -2,7 +2,7 @@
# Install necessary packages
apt-get install -y \
- python3.12-dev python3-babel python3.12-venv \
+ python3-dev python3-babel python3-venv \
uwsgi uwsgi-plugin-python3 \
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev
diff --git a/docker/run/fs/ins/pre_install.sh b/docker/run/fs/ins/pre_install.sh
index 48d6ed5ae..c5d05bcc4 100644
--- a/docker/run/fs/ins/pre_install.sh
+++ b/docker/run/fs/ins/pre_install.sh
@@ -2,8 +2,8 @@
# Update and install necessary packages
apt-get update && apt-get install -y \
- python3.12 \
- python3.12-venv \
+ python3 \
+ python3-venv \
nodejs \
npm \
openssh-server \
@@ -13,18 +13,18 @@ apt-get update && apt-get install -y \
git \
ffmpeg
-# Configure system alternatives so that /usr/bin/python3 points to Python 3.12
-sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
-sudo update-alternatives --set python3 /usr/bin/python3.12
+# # Configure system alternatives so that /usr/bin/python3 points to Python 3.12
+# sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
+# sudo update-alternatives --set python3 /usr/bin/python3.12
# Update pip3 symlink: if pip3.12 exists, point pip3 to it;
# otherwise, install pip using Python 3.12's ensurepip.
-if [ -f /usr/bin/pip3.12 ]; then
- sudo ln -sf /usr/bin/pip3.12 /usr/bin/pip3
-else
+# if [ -f /usr/bin/pip3.12 ]; then
+# sudo ln -sf /usr/bin/pip3.12 /usr/bin/pip3
+# else
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip
-fi
+# fi
# Prepare SSH daemon
bash /ins/setup_ssh.sh "$@"
diff --git a/python/helpers/history.py b/python/helpers/history.py
index c09ef61a5..daa6a45af 100644
--- a/python/helpers/history.py
+++ b/python/helpers/history.py
@@ -4,7 +4,7 @@ from collections import OrderedDict
from collections.abc import Mapping
import json
import math
-from typing import Coroutine, Literal, TypedDict, cast, Union, Dict, List, Any, override
+from typing import Coroutine, Literal, TypedDict, cast, Union, Dict, List, Any
from python.helpers import messages, tokens, settings, call_llm
from enum import Enum
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage, AIMessage
@@ -82,7 +82,6 @@ class Message(Record):
self.summary: str = ""
self.tokens: int = tokens or self.calculate_tokens()
- @override
def get_tokens(self) -> int:
if not self.tokens:
self.tokens = self.calculate_tokens()