test fixes
frdel committed
Apr 1, 2025 at 17:18 UTC
fbb0a072cd49d9516dd0153aef9beb7d84821cc4
3 files changed
+11
-12
docker/run/fs/ins/install_searxng.sh
+1
-1
@@ -2,7 +2,7 @@
2
3
# Install necessary packages
4
apt-get install -y \
5
- python3.12-dev python3-babel python3.12-venv \
5
+ python3-dev python3-babel python3-venv \
6
uwsgi uwsgi-plugin-python3 \
7
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev
8
docker/run/fs/ins/pre_install.sh
+9
-9
@@ -2,8 +2,8 @@
2
3
# Update and install necessary packages
4
apt-get update && apt-get install -y \
5
- python3.12 \
6
- python3.12-venv \
5
+ python3 \
6
+ python3-venv \
7
nodejs \
8
npm \
9
openssh-server \
@@ -13,18 +13,18 @@ apt-get update && apt-get install -y \
13
git \
14
ffmpeg
15
16
-# Configure system alternatives so that /usr/bin/python3 points to Python 3.12
17
-sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
18
-sudo update-alternatives --set python3 /usr/bin/python3.12
16
+# # Configure system alternatives so that /usr/bin/python3 points to Python 3.12
17
+# sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
18
+# sudo update-alternatives --set python3 /usr/bin/python3.12
19
20
# Update pip3 symlink: if pip3.12 exists, point pip3 to it;
21
# otherwise, install pip using Python 3.12's ensurepip.
22
-if [ -f /usr/bin/pip3.12 ]; then
23
- sudo ln -sf /usr/bin/pip3.12 /usr/bin/pip3
24
-else
22
+# if [ -f /usr/bin/pip3.12 ]; then
23
+# sudo ln -sf /usr/bin/pip3.12 /usr/bin/pip3
24
+# else
25
python3 -m ensurepip --upgrade
26
python3 -m pip install --upgrade pip
27
-fi
27
+# fi
28
29
# Prepare SSH daemon
30
bash /ins/setup_ssh.sh "$@"
python/helpers/history.py
+1
-2
@@ -4,7 +4,7 @@ from collections import OrderedDict
4
from collections.abc import Mapping
5
import json
6
import math
7
-from typing import Coroutine, Literal, TypedDict, cast, Union, Dict, List, Any, override
7
+from typing import Coroutine, Literal, TypedDict, cast, Union, Dict, List, Any
8
from python.helpers import messages, tokens, settings, call_llm
9
from enum import Enum
10
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage, AIMessage
@@ -82,7 +82,6 @@ class Message(Record):
82
self.summary: str = ""
83
self.tokens: int = tokens or self.calculate_tokens()
84
85
- @override
85
def get_tokens(self) -> int:
86
if not self.tokens:
87
self.tokens = self.calculate_tokens()