Agent Zero AI framework
test fixes
frdelfbb0a072cd49
diff --git a/docker/run/fs/ins/install_searxng.sh b/docker/run/fs/ins/install_searxng.shindex 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 packagesapt-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-devdiff --git a/docker/run/fs/ins/pre_install.sh b/docker/run/fs/ins/pre_install.shindex 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 packagesapt-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+# elsepython3 -m ensurepip --upgradepython3 -m pip install --upgrade pip-fi+# fi# Prepare SSH daemonbash /ins/setup_ssh.sh "$@"diff --git a/python/helpers/history.py b/python/helpers/history.pyindex c09ef61a5..daa6a45af 100644--- a/python/helpers/history.py+++ b/python/helpers/history.py@@ -4,7 +4,7 @@ from collections import OrderedDictfrom collections.abc import Mappingimport jsonimport math-from typing import Coroutine, Literal, TypedDict, cast, Union, Dict, List, Any, override+from typing import Coroutine, Literal, TypedDict, cast, Union, Dict, List, Anyfrom python.helpers import messages, tokens, settings, call_llmfrom enum import Enumfrom 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()- @overridedef get_tokens(self) -> int:if not self.tokens:self.tokens = self.calculate_tokens()