summaryrefslogtreecommitdiffstats
path: root/src/render/mod.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-08 17:13:11 +0800
committerGitHub <noreply@github.com>2023-03-08 17:13:11 +0800
commit2539e24fe9eadf69cb20b01d2303a99fa2e8a363 (patch)
treeb1b4b6a9e9df9d16870219a53b75a4456829a005 /src/render/mod.rs
parentee812754313ebd16d34dff3d925afc4402c029fa (diff)
downloadaichat-2539e24fe9eadf69cb20b01d2303a99fa2e8a363.tar.gz
chore: improve code by getting prompt from config (#39)
Diffstat (limited to 'src/render/mod.rs')
-rw-r--r--src/render/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/render/mod.rs b/src/render/mod.rs
index 938baad..001ae6c 100644
--- a/src/render/mod.rs
+++ b/src/render/mod.rs
@@ -16,7 +16,6 @@ use std::thread::spawn;
pub fn render_stream(
input: &str,
- prompt: Option<String>,
client: &ChatGptClient,
highlight: bool,
repl: bool,
@@ -43,7 +42,7 @@ pub fn render_stream(
drop(wg);
ReplyStreamHandler::new(None, abort)
};
- client.send_message_streaming(input, prompt, &mut stream_handler)?;
+ client.send_message_streaming(input, &mut stream_handler)?;
let buffer = stream_handler.get_buffer();
Ok(buffer.to_string())
}