Tweaking OAI settings

This commit is contained in:
2023-07-06 23:47:06 -04:00
parent 81b5cb4b32
commit d8b95e5f2c
2 changed files with 23 additions and 14 deletions

View File

@@ -18,9 +18,6 @@ use songbird::SerenityInit;
mod commands;
mod database;
pub const MIGRATIONS: diesel_migrations::EmbeddedMigrations = diesel_migrations::embed_migrations!("migrations");
struct Handler {
// Open AI Config
oai: Option<commands::oai::OAI>,
@@ -125,7 +122,7 @@ async fn main() {
Ok(token) => {
info!("Loaded OpenAI token");
Handler {
oai: Some(commands::oai::OAI { client: reqwest::Client::new(), base_url: "https://api.openai.com/v1".to_string(), max_attempts: 5, token }),
oai: Some(commands::oai::OAI { client: reqwest::Client::new(), base_url: "https://api.openai.com/v1".to_string(), max_attempts: 5, token , max_context_questions: 10 }),
pool
}
}