rename generate_with_mpsc to generate_with_flume

master
Tymon 1 year ago
parent 6a5ebc3c2f
commit 1306d3ac47

@ -102,7 +102,7 @@ pub struct Response {
pub output: String,
}
pub fn generate_with_mpsc(ai: AI, params: Params, tx: Sender<Response>) {
pub fn generate_with_flume(ai: AI, params: Params, tx: Sender<Response>) {
tokio::spawn(async move {
let output = match generate(ai, params).await {
Ok(output) => Response {

@ -14,7 +14,7 @@ use eframe::{
use egui_notify::Toasts;
use ai_core::{
ai::{generate_with_mpsc, Params, Response, ResponseType, AI},
ai::{generate_with_flume, Params, Response, ResponseType, AI},
history::{read_all_history, write_history, HistoryEntry},
};
@ -169,7 +169,7 @@ impl eframe::App for App {
if ui.button("Generate!").clicked() {
self.output = "Generating...".to_string();
generate_with_mpsc(
generate_with_flume(
self.selected_ai.clone(),
self.params.clone(),
self.tx.clone(),