From 06a3aef92a3584823d4db5b77ad49d54d875cbe8 Mon Sep 17 00:00:00 2001 From: projectmoon Date: Mon, 7 Oct 2024 22:31:17 +0200 Subject: [PATCH] various updates --- CHANGELOG.md | 8 ++++++++ gpu_layer_scaler.py | 8 ++++++-- osm.py | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea32af5..6ddbe9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -129,6 +129,9 @@ # GPU Scaling Filter +**0.2.1:** + - Fixes for internal OpenWebUI refactoring. + **0.2.0:** - Fix filter not working when using base models directly. - Do not fire the filter if model is not owned by ollama. @@ -144,3 +147,8 @@ **0.1.0:** - Initial Release + +# Collapsible Thought Filter + +**0.1.0:** + - Initial release. diff --git a/gpu_layer_scaler.py b/gpu_layer_scaler.py index 71c42ea..a4da03f 100644 --- a/gpu_layer_scaler.py +++ b/gpu_layer_scaler.py @@ -2,7 +2,7 @@ title: GPU Scaling Filter author: projectmoon author_url: https://git.agnos.is/projectmoon/open-webui-filters -version: 0.2.0 +version: 0.2.1 license: AGPL-3.0+ required_open_webui_version: 0.3.9 """ @@ -18,11 +18,15 @@ from typing import Callable, Awaitable, Any, Optional, Literal import json # OpenWebUI imports -from config import CHROMA_CLIENT +from open_webui.apps.rag.vector.connector import VECTOR_DB_CLIENT from utils.misc import get_last_user_message, get_last_assistant_message from apps.ollama.main import generate_chat_completion, GenerateChatCompletionForm from apps.webui.models.users import UserModel +# Why refactor when you can janky monkey patch? This will NOT be fixed at +# some point, as this filter is deprecated. +CHROMA_CLIENT = VECTOR_DB_CLIENT.client + class GpuChatState: """ Get or set GPU layer count by base model for a given chat. diff --git a/osm.py b/osm.py index bdbc533..d6b0d5a 100644 --- a/osm.py +++ b/osm.py @@ -1,7 +1,7 @@ """ title: OpenStreetMap Tool author: projectmoon -nauthor_url: https://git.agnos.is/projectmoon/open-webui-filters +author_url: https://git.agnos.is/projectmoon/open-webui-filters version: 1.0.0 license: AGPL-3.0+ required_open_webui_version: 0.3.21