fix: fix GigaChatClient class name in main and change import paths

This commit is contained in:
parent e734b9d827
commit a43873109c
2 changed files with 9 additions and 9 deletions

16
main.py
View File

@ -1,4 +1,4 @@
from integrations.gigachat_api_client import GigaChatManager
from src.integrations.gigachat_api_client import GigaChatClient
from src.bot.telegram_userbot import TelegramUserBot
from src.core.configuration import config
@ -8,19 +8,19 @@ def main() -> None:
Entry point for starting the Telegram user bot.
"""
# Load API credentials and configuration
api_id = config.API_ID
api_hash = config.API_HASH
api_token = config.API_GIGACHAT_TOKEN
api_id: str = config.API_ID
api_hash: str = config.API_HASH
api_token: str = config.API_GIGACHAT_TOKEN
# Initialize GigaChatManager
gigachat_manager = GigaChatManager(api_token=api_token)
# Initialize GigaChatClient
gigachat_client: GigaChatClient = GigaChatClient(api_token=api_token)
# Initialize and run the Telegram user bot
bot = TelegramUserBot(
bot: TelegramUserBot = TelegramUserBot(
session_name="userbot",
api_id=api_id,
api_hash=api_hash,
gigachat_manager=gigachat_manager
gigachat_client=gigachat_client
)
bot.run()

View File

@ -5,7 +5,7 @@ from pyrogram.client import Client
from pyrogram.types import Message
from pyrogram.enums import ChatAction
from integrations.gigachat_api_client import GigaChatClient
from src.integrations.gigachat_api_client import GigaChatClient
class TelegramUserBot: