Add files requirements

This commit is contained in:
Heiner Lohaus 2025-01-05 20:20:25 +01:00
parent 12c413fd2e
commit 13b6fdef98
5 changed files with 23 additions and 18 deletions

View file

@ -78,7 +78,7 @@ RUN pip install --break-system-packages --upgrade pip \
&& pip install --break-system-packages \
undetected-chromedriver selenium-wire \
&& pip uninstall -y --break-system-packages \
pywebview plyer
pywebview
# Copy the entire package into the container.
ADD --chown=$G4F_USER:$G4F_USER g4f $G4F_DIR/g4f

View file

@ -1126,8 +1126,12 @@ ul {
display: flex;
}
#systemPrompt {
padding-left: 48px;
#systemPrompt::placeholder {
text-align: center;
}
.settings h3 {
text-align: center;
}
}

View file

@ -734,10 +734,11 @@ const ask_gpt = async (message_id, message_index = -1, regenerate = false, provi
messages = prepare_messages(conversation.items, message_index, action=="continue");
message_storage[message_id] = "";
stop_generating.classList.remove("stop_generating-hidden");
const scroll = true;
if (message_index > 0 && message_index + 1 < messages.length) {
let scroll = true;
if (message_index > 0 && parseInt(message_index, 10) + 1 < conversation.items.length) {
scroll = false;
}
if (scroll) {
await lazy_scroll_to_bottom();
}
@ -1157,7 +1158,7 @@ const load_conversation = async (conversation_id, scroll=true) => {
highlight(message_box);
regenerate_button.classList.remove("regenerate-hidden");
if (document.querySelector("#input-count input").checked) {
if (scroll && document.querySelector("#input-count input").checked) {
message_box.scrollTo({ top: message_box.scrollHeight, behavior: "smooth" });
setTimeout(() => {

View file

@ -16,7 +16,8 @@ brotli
beautifulsoup4
aiohttp_socks
pywebview
plyer
cryptography
nodriver
python-multipart
pypdf2
docx

View file

@ -36,6 +36,11 @@ EXTRA_REQUIRE = {
"uvicorn", # api
"nodriver",
"python-multipart",
"pypdf2", # files
"docx",
"odfpy",
"ebooklib",
"openpyxl",
],
'slim': [
"curl_cffi>=0.6.2",
@ -49,22 +54,17 @@ EXTRA_REQUIRE = {
"fastapi", # api
"uvicorn", # api
"python-multipart",
"pypdf2", # files
"docx",
],
"image": [
"pillow",
"cairosvg",
"beautifulsoup4"
],
"webdriver": [
"platformdirs",
"undetected-chromedriver>=3.5.5",
"setuptools",
"selenium-wire"
],
"webview": [
"webview",
"pywebview",
"platformdirs",
"plyer",
"cryptography"
],
"api": [
@ -87,7 +87,6 @@ EXTRA_REQUIRE = {
],
"files": [
"spacy",
"filesplit",
"beautifulsoup4",
"pypdf2",
"docx",