From 0be88732c6354facd0a6e3b7404129c063466cb9 Mon Sep 17 00:00:00 2001 From: Emile Date: Mon, 28 Jun 2021 19:59:54 +0100 Subject: [PATCH] Cleaned up import paths and added more gpt to gitignore --- .gitignore | 1 + src/main.rs | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 7eb6f32..031cd9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /target .vscode gpt/ +gpt bot_config.json fediverse.toml \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 1d1524d..514c242 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,9 @@ use std::{error::Error, process, thread, time::Duration}; use chrono::Local; use rand::Rng; -use crate::publish::ConsolePublisher; +use crate::{ + bot::IzzilisBot, generator::Generator, publish::FediversePublisher, selection::ConsoleSelector, +}; mod bot; mod config; @@ -45,11 +47,11 @@ fn main() -> Result<(), Box> { "1".to_string(), ], ); - // let publisher = publish::FediversePublisher::new(cfg.fediverse_base_url())?; - let publisher = ConsolePublisher::new(); - let gen = generator::Generator::new(gpt_model); - let console_selector = selection::ConsoleSelector::new(); - let mut bot = bot::IzzilisBot::new(gen, publisher, console_selector); + let publisher = FediversePublisher::new(cfg.fediverse_base_url())?; + // let publisher = ConsolePublisher::new(); + let gen = Generator::new(gpt_model); + let console_selector = ConsoleSelector::new(); + let mut bot = IzzilisBot::new(gen, publisher, console_selector); bot.generate_samples(); let cfg_interval = cfg.interval_seconds();