From fe984161e163f1f0d542589fd3e00d70d29ea293 Mon Sep 17 00:00:00 2001 From: ruecat <79139779+ruecat@users.noreply.github.com> Date: Tue, 30 Jan 2024 15:04:18 +0300 Subject: [PATCH] Update modelmanager --- bot/run.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/run.py b/bot/run.py index 5cbe04a..6a2ac2c 100644 --- a/bot/run.py +++ b/bot/run.py @@ -10,7 +10,7 @@ import traceback import io import base64 - +import ollama bot = Bot(token=token) dp = Dispatcher() builder = InlineKeyboardBuilder() @@ -97,7 +97,7 @@ async def command_get_context_handler(message: Message) -> None: @dp.callback_query(lambda query: query.data == "modelmanager") async def modelmanager_callback_handler(query: types.CallbackQuery): - models = await model_list() + models = ollama.list()["models"] modelmanager_builder = InlineKeyboardBuilder() for model in models: modelname = model["name"] @@ -112,7 +112,7 @@ async def modelmanager_callback_handler(query: types.CallbackQuery): ) ) await query.message.edit_text( - f"Choose model:", reply_markup=modelmanager_builder.as_markup() + f"{len(models)} models available.\nšŸ¦™ = Regular\nšŸ¦™šŸ“· = Multimodal", reply_markup=modelmanager_builder.as_markup() )