mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2026-01-08 07:26:09 +01:00
24 lines
504 B
Python
24 lines
504 B
Python
import json
|
|
import logging
|
|
|
|
from chat_gpt3_bot import ChatGPT3Bot
|
|
from telegram_bot import ChatGPT3TelegramBot
|
|
|
|
|
|
def main():
|
|
logging.basicConfig(
|
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
|
level=logging.INFO
|
|
)
|
|
|
|
with open("config.json", "r") as f:
|
|
config = json.load(f)
|
|
|
|
gpt3_bot = ChatGPT3Bot(config=config)
|
|
telegram_bot = ChatGPT3TelegramBot(config=config, gpt3_bot=gpt3_bot)
|
|
telegram_bot.run()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|