Skip to content

Commit

Permalink
Update info & remove checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ruecat committed Feb 27, 2024
1 parent 0d969eb commit 6f317ae
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions bot/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from aiogram.enums import ParseMode
from aiogram.filters.command import Command, CommandStart
from aiogram.types import Message
from aiogram import F
from aiogram.utils.keyboard import InlineKeyboardBuilder
from func.functions import *
# Other
Expand All @@ -14,7 +13,7 @@
dp = Dispatcher()
builder = InlineKeyboardBuilder()
builder.row(
types.InlineKeyboardButton(text="🤔️ Information", callback_data="info"),
types.InlineKeyboardButton(text="ℹ️ About", callback_data="info"),
types.InlineKeyboardButton(text="⚙️ Settings", callback_data="modelmanager"),
)

Expand Down Expand Up @@ -49,7 +48,7 @@ async def get_bot_info():
# /start command
@dp.message(CommandStart())
async def command_start_handler(message: Message) -> None:
start_message = f"Welcome, <b>{message.from_user.full_name}</b>!\n<a href='https://github.com/ruecat/ollama-telegram'>Source Code</a>"
start_message = f"Welcome, <b>{message.from_user.full_name}</b>!"
await message.answer(
start_message,
parse_mode=ParseMode.HTML,
Expand Down Expand Up @@ -125,13 +124,13 @@ async def model_callback_handler(query: types.CallbackQuery):
@dp.callback_query(lambda query: query.data == "info")
@perms_admins
async def info_callback_handler(query: types.CallbackQuery):
print('info triggered.')
dotenv_model = os.getenv("INITMODEL")
global modelname
print(modelname)
await bot.send_message(
chat_id=query.message.chat.id,
text=f"<b>📦 LLM</b>\n<code>Model: {modelname}</code>",
text=f"<b>About Models</b>\nCurrent model: <code>{modelname}</code>\nDefault model: <code>{dotenv_model}</code>\nThis project is under <a href='https://github.com/ruecat/ollama-telegram/blob/main/LICENSE'>MIT License.</a>\n<a href='https://github.com/ruecat/ollama-telegram'>Source Code</a>",
parse_mode=ParseMode.HTML,
disable_web_page_preview=True,
)


Expand Down

0 comments on commit 6f317ae

Please sign in to comment.