Files
chatgpt-telegram-bot/main.py
2022-12-04 19:50:42 +01:00

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()